I'm trying to use a Allen Bradley 1769-L24ER-QB1B PLC to send a command from my Studio5000 logic to a Cognex DataMan 262Q barcode scanner. Specifically, I want to change the barcode string that the dataman matches to a returned string.
I'm working with a HMI using FactoryTalk ME. VisionView is launched from the HMI and displays the barcode scanned from the Dataman 262. If a barcode does not match the one selected in the FactoryTalk program I would like for the VisionView software to show the red box around the scanned barcode. Currently, as long as ANY barcode is successfully scanned, VisionView will display it as passed with a green box.
I know this can be done from the VisionView settings by manually entering the barcode in the 'Set match string' option. However, I want to make it so that if I select a barcode string from a preloaded list in FactoryTalk then it will load that string into the Visionview, i.e. make it so there is no reason to go into the VisionView settings to change the barcode to be matched.
I can successfully send commands to change what type of barcode will be scanned by the dataman. However I cannot get the 'set match string' commands to work.
I am using the following commands by writing the string into the Vision:O.UserData,
First, I believe I am supposed to enable the 2D barcode 'set match string' setting with,
||>SET DVALID.PROG-TARG [1]
Then send the desired barcode string to the dataman with,
||>SET DVALID.MATCH-STRING "[barcode]"
I feel like I either need another command to enable something else first or the commands are not right.
Do I need to add the footers? Like \r\n or \CR\LR?
Any help is appreciated!!
EDIT: I should add that I pretty much know that the ||>SET DVALID.PROG-TARG [1] is not being executed because the 'command acknowledge bit' for the scanner does not trigger when the command is sent. This leads me to believe the command is not correct but I can't figure out why.
I'm working with a HMI using FactoryTalk ME. VisionView is launched from the HMI and displays the barcode scanned from the Dataman 262. If a barcode does not match the one selected in the FactoryTalk program I would like for the VisionView software to show the red box around the scanned barcode. Currently, as long as ANY barcode is successfully scanned, VisionView will display it as passed with a green box.
I know this can be done from the VisionView settings by manually entering the barcode in the 'Set match string' option. However, I want to make it so that if I select a barcode string from a preloaded list in FactoryTalk then it will load that string into the Visionview, i.e. make it so there is no reason to go into the VisionView settings to change the barcode to be matched.
I can successfully send commands to change what type of barcode will be scanned by the dataman. However I cannot get the 'set match string' commands to work.
I am using the following commands by writing the string into the Vision:O.UserData,
First, I believe I am supposed to enable the 2D barcode 'set match string' setting with,
||>SET DVALID.PROG-TARG [1]
Then send the desired barcode string to the dataman with,
||>SET DVALID.MATCH-STRING "[barcode]"
I feel like I either need another command to enable something else first or the commands are not right.
Do I need to add the footers? Like \r\n or \CR\LR?
Any help is appreciated!!
EDIT: I should add that I pretty much know that the ||>SET DVALID.PROG-TARG [1] is not being executed because the 'command acknowledge bit' for the scanner does not trigger when the command is sent. This leads me to believe the command is not correct but I can't figure out why.
Last edited: