Sign in to follow this  
Followers 0
Ricardo G

Cognex PMCR protocol

9 posts in this topic

Hi everybody, I'm a service enginner in Mexico, and I have a problem integrating a Cognex Dataman camera to a Omron PLC, the Controller is CJ1M CPU22, I'm trying to use a SCU21-V1 serial unit with two ports. I'm familiar with Omron PLC programming but not with this PMCR thing Ihave been trying different things like sending the trigger string sing TXDU and RXDU instructions with no sucess, then customer told me, hey we have another machine doing exactly the same, you can copy-paste the solution. the other machine has very similar configuration, CPU 13, but it called my atention all the comunication with the camera was trhu a PMCR function, I copied and adjusted the control words related to the logical and physical port, and unit number, it didnt work, after reading a lot I found out the PMCR runs protocols made in CX-protocol. So I have some questions: 1- Can I retrieve the protocol from the other machine? is it stored in the SCU21 unit? 2- How can I make a new protocol for this device? 3- does anybody knows another way to do this without the PMCR? I'm getting into the anxiety zone, been here almost a week with an issue harder than I thought

Share this post


Link to post
Share on other sites
1- Can I retrieve the protocol from the other machine? is it stored in the SCU21 unit? Yes. It will a 'Project' protocol and not a 'System' protocol. Is the interface Modbus RTU? If so the Protocol Macro file is available in the download section of the site.

Share this post


Link to post
Share on other sites
thank you BobB, I will try today of retrieving the protocol from the other machine today, I don't know if the cognex camera is using Modbus RTU, I guess not. thank you vey much for your help

Share this post


Link to post
Share on other sites
I had a quick look at the Cognex distributor site in Australia and it appears they have I/O modules for serial communications but no indication as to the protocol. Best get the model number and see if you can download a manual - also check for a separate I/O module.

Share this post


Link to post
Share on other sites
BobB, I retrived the protocol from the other machine using CX-protocol, and downloaded to my project, I have half of the problem solved, Now I can trigger the reader by PLC sequence and it reads fine, but I never got the data, using the trace feature I don't see anything coming back from the reader. I made a test using the other machine, both cameras reads OK so, I can forget about camera configuration, also both of the cameras can be treggered on my project, but any sends data back. I guess I have some small differences on configuration, I will double check the DM area for communication unit settings (DM 30200 to DM 30299 for unit 2). I really appreciate you help, I have never used protocol before.

Share this post


Link to post
Share on other sites
Have a look at the setup of the serial port and the address of the serial card - rotary switch on the front. You can set up the serial card without going into the DMs - turn the PLC to program mode - go to the I/O table - open the serial card and set it up. be careful, you will have to set the port to user settings as well as all the other stuff - if you do not the configuration will not download and there is no warning.

Share this post


Link to post
Share on other sites
Ricardo It sounds like you should be almost there! Trying the 2nd bar code reader on the 1st system was a very good idea! Did you also try the cable that you have for the second system? If you can trigger the reader, but are getting no data, it could be something as simple as the cable. Like Bob indicated, check the port settings. I do this in CX Programmer. Check each and every setting to make certain that the 2nd systems settings are the same as the first. If you are not seeing any response in the Trace function, then the data is not getting back to the card. Is the 'Protocol Macro Transmission Method' set for Half Duplex or Full Duplex? It should be Full Duplex, as this is RS232.

Share this post


Link to post
Share on other sites
Something else that I ran into while testing this. If you have a 'lab' PLC that you have used for other things in the past, clear out the DM area that configures the module. For you, that is D30,100 - D30,199. Set them all to 0000. Then download the configuration of the module through the IO table. I had some 'stale' data' in the DMs from something else I had done before, and it was causing me some problems.

Share this post


Link to post
Share on other sites
Thank you guys for all your help!! I followed all your directions, now I have a trace were the reader is sending back "something" is not correct yet, but at least is has the same quantity of expected characters.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0