To learn more about triggers in general, see section Understanding Triggers.
Serial port trigger event occurs when data is received on the monitored RS232 serial port.
Typical usage: (1) Printer replacement. You are retiring the existing serial port-connected label printer. In its place NiceLabel Automation will accept the data, extract the values for label objects from the received print stream, and create a print job for the new printer model. (2) Weight scales. Weight scales provides data about the weighted object. NiceLabel Automation extracts the required data from the received data stream, and prints a label. For more information on how to parse and extract data, see section Understanding Filters.
General
This section allows you to configure the most important file trigger settings.
-
Name: Specifies the unique name of the trigger. The names helps you distinguish between different triggers when you configure them in Automation Builder, and later when you run them in Automation Manager.
-
Description: Allows you to describe the role of this trigger. Help the users with a short explanation about what the trigger does.
-
Port: Specifies the serial port (COM) number on which the incoming data is received. Use a port that is not in use by any other application or device, such as printer driver. If the selected port is in use, you won't be able to start the trigger in Automation Manager.
The options in the Port Settings section specify communication parameters that must match the serial port device parameters.
-
Disable port initialization: Port initialization is not executed after you start the trigger in Automation Manager. This option is sometimes required for virtual COM ports.
Execution
-
Use initialization data: Specifies that you want to send the initialization string to the serial device each time the trigger is started. Some serial devices require to be awaken or put into standby mode before they can provide the data. For more information about the initialization string and if you need it at all, see your device's user guide. You can include binary characters. For more information, see section Entering Special Characters.
-
Use data polling: Specifies that the trigger actively asks the device for data. Within the specified time intervals, the trigger sends the commands provided in the Contents field. This field can include binary characters. For more information, see section Entering Special Characters.
Other
Options in the Feedback from the Print Engine section specify communication parameters that allow you to receive print engine feedback.
-
Supervised printing: Activates synchronous printing mode. Use it whenever you want to send the print job status back to the third party application. For more information, see section Synchronous Print Mode.
Options in the Data Processing section specify if you want to trim the data so that it fits into a variable, or ignore the missing label variables. By default, reports errors and breaks the printing process if you try to save values that are too long in label variables, or try to set values for non-existing label variables.
-
Ignore excessive variable contents: truncates data values that exceed the length of the variable as defined in the label designer to make them fit. This option is in effect if you are setting variable values in filters, from command files, and when you are setting values of trigger variables to label variables of the same name.
Example 20. Example
Label variable accepts 5 characters at maximum. With this option enabled, any value longer than 5 characters is truncated to the first 5 characters. If the value is 1234567 ignores digits 6 and 7.
-
Ignore missing label variables: When printing with command files (such as JOB file), the printing process ignores all variables that are:
-
specified in the command file (using the SET command)
-
not defined on the label
Similar happens if you define assignment area in a filter to extract all name-value pairs, but your label contains fewer variables.
When setting values of non-existing label variables, reports an error. If this option is enabled, the printing continues.
-
Options in Scripting section specify scripting possibilities.
-
Scripting language: Selects scripting language for the trigger. All Execute script actions that you use within a single trigger use the selected scripting language.
Options in the Save Received Data section specify the available commands for data that the trigger receives.
-
Save data received by the trigger to file: Enable this option to save the data received by the trigger. The option Variable enables variable file name. Select a variable that contains path and file name.
-
On error save data received by the trigger to file: Enable this option to save the data into the trigger only if an error occurs during the action execution. You might want to enable this option to keep the data that caused the issue ready for troubleshooting.
Note
Make sure you enable the Supervised printing support. If not, cannot detect errors during the execution. For more information, see section Synchronous Print Mode.
Note
NiceLabel Automation saves the received data into a temporary file. This temporary file is deleted right after the trigger execution completes. The internal variable
DataFileName
points to that file name. For more information, see Internal Variables.