Preventing A Printout Until A Tare Weight Is Met Follow

0
Avatar
Legacy Poster

Hello,

 

I am printing labels once a weight value has been met using the weigh scale display tool. When a stable scale weight has been met after two seconds I print the label. The process happens again with the next pallet. I do not print anything with a weight less than 46, the tare weight being 42 (the weight of the scale itself without a pallet on it). However sometimes the pallet will move slightly after a good read and then stop again with a new weight. Of course another label prints out but it will go to the pallet behind it when it should not. I want to be able to take the weight and not print another label again unless the tare weight is measured first.

 

1. Tare weight: 42 lbs.

2. Loaded Pallet weight: 2000 lbs.

3. Loaded Pallet weight after moving slightly but then stopping again: 1500 lbs - this will not print because the software is waiting until it comes back down to the Tare weight.

4. Loaded Pallet has moved off of the scale completely Tare weight: 42 lbs - A new label will print as soon as a new weight appears > 45 lbs.

 

I understand I may be able to do this at the document level using VBScript. Could anyone please direct or provide an example on how I might do this? Is this possible?

 

Thanks.

1 comments

0
Avatar
Legacy Poster
Comment actions Permalink

I am unable to test it at the moment but so far I have this on the OnPrintJobStart event:

 

'Executes at the start of a print job.
If IsNumeric(Format.NamedSubStrings("WeightFromScale").Value) then
    'Current weight is greater than tare weight 
    If CInt(Format.NamedSubStrings("WeightFromScale").Value) > 45 then
        'Has Tare Weight requirement flag been set?
          If ok2Print = true then            
              'Print Job
            'Reset Tare Weight flag
              ok2Print = false
          Else
            'Flag has not been set so Tare Weight has not been met, do not print
              Format.CancelPrinting("Tare Weight Not Met") 
          End If
    Else
        'Tare weight has been made so next stable weight can be printed
        ok2Print = true
        'Do not print
          Format.CancelPrinting("Tare Weight Not Met") 
    End If
End If 
 
ok2Print is a flag variable I set under Functions and Subs.
 
Would something like this work?

Please sign in to leave a comment.