Topics covered in the video:
Scripting helps to simplify the integration of programmable logic controllers (PLCs) and DataMan barcode readers into a factory network. Scripts also manage the inputs and outputs of digital data and enable:
Data formatting for:
Output strings and string comparison
Statistics and metrics
Input and output states
Set or Get parameters
FTP storage (image renaming and transfer of images and data)
Communications with external devices, setting a timer and managing encoder input
How to Enable DataMan Scripting
The Setup Tool is used to initiate scripting. There are several steps in this process:
Connecting to the DataMan barcode reader
Clicking on the Format Data square at the bottom left of the screen
Selecting 'script-based formatting' and clicking a link to execute the command
Scripting Samples for Data Formatting, FTP Storage and Communications
Three primary DataMan scripts perform basic functions like data formatting, FTP storage and communication:
Data formatting.Examples include comment text, the 'onResult' function, 'if' conditions, 'output.content' and output strings.
FTP storage. Examples include generating image names before FTP transfer, process control metrics (PCM) reports and verification reports.
Communications. Examples include 'onConnect' and 'onDisconnect,' 'onExpectedData,' (called after receiving a data string from an external device) and 'onTimer,' (called after the timer counts to zero).
The DataMan image processing sequence involves five steps:
Each step is reviewed in detail in the video.
DataMan Control Commands (DMCC)
DMCC is a Cognex protocol for communicating with DataMan barcode readers. Sample commands include:
||> GET TRIGGER.TYPE - returns the value of a parameter setting
||> GET RESULT - returns the last result of a decoded string
||> SET SYMBOL.DATAMATRIX ON - Sets the value of a parameter
||> Reboot - Makes the barcode reader perform an action
All DMCCs are available in the DataMan Setup Tool and accessible by clicking on 'Help' in the top right corner of the screen.
Cognex Corporation published this content on 15 September 2021 and is solely responsible for the information contained therein. Distributed by Public, unedited and unaltered, on 15 September 2021 21:01:07 UTC.