Trouble sending commands to a barcode scanner from a PLC

Walks

Member
Join Date
Jun 2018
Location
Midwest
Posts
47
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.
 
Last edited:
Thank you gclshortt,

Using that trigger command with some of the other code works well enough for my application. All I did was copy the returned barcode string to the Vision:O.UserData instead of the full "||>SET DVALID.MATCH-STRING..." command and then trigger the ".SetMatchString".

My only issue with this is that it copies the new barcode to ALL the barcode types available. So I can only be running 1 barcode at a time. I thought that the "||>SET DVALID.PROG-TARG [1]" command was supposed to fix this.
 
Hi,
Which DMCC Command do I need to send to the barcode reader to switch between the read setups.
I know it is irrelevant question here but unfortunately I could not create a new forum for this
 

Similar Topics

I have an AD D0-06DR and I'm trying to communicate with an Electroin Displays brand LED message board. I'm fairly new to the PLC game and this is...
Replies
8
Views
1,959
After the new very nice update to this site I could not log in with my original password, tried to recover my account but did not recieve a email...
Replies
14
Views
341
Hi everyone. I have an issue with an Allen Bradley PLC model 1769-L30ER. This PLC had a previous program with a different IP address but when I...
Replies
4
Views
469
Hello, We are having trouble setting up a generic ethernet module for a Yaskawa GA80U4168 drive in RSLogix 5000 Version 20.01. All of the...
Replies
1
Views
516
I was interested in buying several of the Personal PLC tutor courses from the PLC training store on this site (http://www.plcs.net/store.shtml)...
Replies
4
Views
949
Back
Top Bottom