Print

From PlcWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with 'Printing can be performed from the client or from the server. From the client It is linked to surgery. If we need to follow up on SequenceCheck, we will do the following: Ope…')
 
Line 3: Line 3:
From the client
From the client
-
It is linked to surgery. If we need to follow up on SequenceCheck, we will do the following:
+
It is linked to the operation. If we need to follow up on SequenceCheck, we will do the following:
  Operation.ProductID.Index = 0
  Operation.ProductID.Index = 0

Current revision as of 12:32, 13 October 2020

Printing can be performed from the client or from the server.

From the client

It is linked to the operation. If we need to follow up on SequenceCheck, we will do the following:

Operation.ProductID.Index = 0
Operation.ProductID.LabelPrint.PrintCommand = / usr / local / plc / bin / label_print
# The label is printed out immediately when the product is finished
Operation.ProductID.LabelPrint.Trigger = Operation
Operation.ProductID.LabelPrint.PrintEvenABCUsed = Yes
Operation.ProductID.LabelPrint.UserDefined.Text.Content = Ok
Operation.ProductID.AsociatedPartIndex = 3
# Operation.ProductID.AsociatedPartIndex = 1

# When the product is sent to rework (PLCSENDREW), the label of the defined operation index bellow (0) will be printed out.
# The settings of Operation.ProductID.LabelPrint.UserDefined.Text.Content will be temporary blank.
WorkPlace.SendToRework.PrintOperationLabel = 0

It is also possible to use a script device.

We will add a device in the client as follows:

#include "drivers / FULL_BROADCAST.drv"
workplace.device.labelprint = yes
workplace.device.labelprint.driver = FULL_BROADCAST
workplace.device.labelprint.settings.type = script
workplace.device.labelprint.settings.debug_mode = no

Events for this device will be handled by the appropriate scripts in the / usr / local / plc / bin / device_scripts / labelprint directory.

In the operation, we will replace the "PrintCommand" parameter with

Operation.ProductID.LabelPrint.PrintDevice = labelprint

The print event is "print", as will the script (or script link). For reprint (PLCPRINTLLABEL), the event is "reprint". For the treatment "PLCLABELREPRINT" it is necessary to create a script "plc_label_reprint" in the bin directory. It does not go through the device, as the only parameter it gets the value of the next scan.

Trigger can be set to:

  • Product - printed when the cockpit is completed
  • Operation - printed during the performed operation (in this case at the cockpit start)
  • Start - ???
Personal tools