CPM2A Serial Out to Barcode Reader

BMA

Member
Join Date
Jun 2008
Location
Nashville, Tn
Posts
4
Although new to this forum, I have received much knowledge from reading many posts....Thanks everyone! I hope to one day to be able to help people out with this forum as much as I have been helped in the past. I do however have what should be a simple serial communication problem between an Omron CPM2A-30CDR-D and a Microscan MS820 barcode reader. What I need to accomplish is to be able to send a simple serial string to the barcode reader that it can recognize: <KC0> Because I have never used the serial output on a PLC and I do not have a similar sample code to go by, I am unsure of my settings. Perhaps someone can look to see if I have made any simple mistakes. (The manual isn't answering every question I have) This is what I have setup:

SW1 on front panel is set to OFF position

Settings for the RS-232 Port:
DM6645 1001 ( Port settings in DM6646, CTS disabled, Link words=0, Communications mode=no protocol )
DM6646 0300 (Baud rate=9,600, Frame Format=1 start bit 7 length 1 stop bit Parity is Even)
DM6647 0000 (0 Transmission Delay)
DM6648 0000 (Node=0, End code is disabled, Start code is disabled)
DM6649 (No start or end code)
I am using the TXD(48) "No protocol" Transmit Mnemonic with the following settings:
@TXD(48)
DM90 (Leading address is DM90)
0000 (Control is set to RS-232 port with Leftmost bytes first)
#0006 (Send 6 bytes: DM90, DM91, DM92)
DM Memory:
DM90 003C ( In ASCII should be: .< )
DM91 4B43 (Shoud be: KC )
DM92 303E (Should be: 0> )


My Questions that the manual just won't answer:

1.Am I setting the DM memmory correctly?

2.Do the RS-232 Port setting memmory areas read left to right or right to left? Should DM6646 be 0030?

3.Should the control in the TXD function be set to leftmost bytes first?

4.Am I sending the right amount of bytes? Can I send 6 bytes?

 
DM Memory:
DM90 003C ( In ASCII should be: .< )
DM91 4B43 (Shoud be: KC )
DM92 303E (Should be: 0> )

I would shift your data one to the left.
DM90 3C4B
DM91 4330
DM92 3E00

Also, check your cable. Omron 9 pin port is NOT
a standard IBM pinout!!

6 bytes should not be a problem.

What software are you using. You should be able to
set the port up in the software. Make sure you download
the settings to the cpu, then CYCLE POWER to make sure the
new settings are loaded.

Let us know how this works out.
 
Thanks GT,

I tried what you suggested above. I still have not been able to communicate with the reader but I am not sure that I could, even if I have all of my settings correct in my PLC. (I have a few different areas of uncertainty) I am using software: CXONE-AL01C-EV2 Ver.2.11
I changed the Host port settings to match the settings of the barcode reader but they do not appear to save to the PLC. I am confused as to how the port settings in the project menu relate to the port settings you set in the DM memmory?
I made the cable which connects the barcode reader to the PLC. I connected the:
Serial device RD (receive data) --------- Pin2 (SD)
Serial device SD (send data)--------------Pin3 (RD)
Serial device SG (signal ground)--------Pin9 (signal ground)
 
First thing to do is try your barcode reader on a PC to verify its ok, and everything works using hyperterminal.
If that works fine, then make sure either the reader is connected straight to the Processor or if you need to use an extension cable that its straight through. If there is a DB9 connector on the scanner it may be that its already wired for the crossed connection.

I've used handheld barcode readers on CPM2A's before, the difference in my case is that the operator triggered the read, I didn't have to command the read.
I found it to be a PITA, and would rather use AB for serial communications.
 
Last edited:
I tried what you suggested above. I still have not been able to communicate with the reader but I am not sure that I could, even if I have all of my settings correct in my PLC. (I have a few different areas of uncertainty) I am using software: CXONE-AL01C-EV2 Ver.2.11
I changed the Host port settings to match the settings of the barcode reader but they do not appear to save to the PLC. I am confused as to how the port settings in the project menu relate to the port settings you set in the DM memmory?
I made the cable which connects the barcode reader to the PLC. I connected the:
Serial device RD (receive data) --------- Pin2 (SD)
Serial device SD (send data)--------------Pin3 (RD)
Serial device SG (signal ground)--------Pin9 (signal ground)

When you download to the plc make sure you check the Settings box. This will properly set the DM area. It is the same as manually setting those registers.

Next thing to do would be to sort pins 4 and 5 on the Omron side. This is RTS/CTS. You may need to do the same on the barcode reader side. I have had that happen before.

Let me know how you make out. I will be back in the office on Monday and will have reference materials available then.
 
Well, unfortunately I still have not had any luck yet.

Averellen, I can connect the barcode reader to Microscan's ESP software and enter their terminal screen from there. If I type my command in from the terminal screen, the scanner responds as it should. I have also connected a serial port monitor to my computer to observe all communication....the command is sent exactly as I sent it throught the port and the scanner responds.

GT, I made sure that I connected the RTS/CTS on the plc as the pinout explained. I also connected them on the scanner side as well, although the ms820 handbook does not talk about doing this.
I made sure to check the settings box after changing the comm settings and then saved to the plc. I believed that the comm settings have saved although when I upload back to the PC the settings revert back to default I'm guessing it's supposed to do this?

The comm light on the front panel blinks once after I have pressed my send button, indicating that the TXD function is at least trying to send something....that's all I get so far.

Thank you,
-Bryan
 
BMA,

Per the manual DM6646 should be 0003, based on:

DM6646 0300 (Baud rate=9,600, Frame Format=1 start bit 7 length 1 stop bit Parity is Even)

It sounds like the Settings are not being saved.
If you upload them from the plc, they should be as set, not original.
When you download the settings to the plc, make sure the plc is in Program mode. Once downloaded, make sure to cycle power on the plc.

Hope this will help.
 

Similar Topics

Hello all, At an installation of ours there is a wierd issue: After a long time of standstill the installation cannot be started. (let me...
Replies
0
Views
1,475
I'm having trouble communicating from PLC to printer. I can use Hyperterminal to go from my PC to the printer and send the file to the printer and...
Replies
1
Views
3,413
Hi, all. I just got an Omron CPM2A off eBay and I need to make my own serial cable to connect it to my computer for programming. I will be...
Replies
5
Views
12,330
dear all, I want to connect 2 CPM2A by serial port but I have some problems. so that I want to ask 1. How is the setting in the memory of the...
Replies
0
Views
3,392
I have 5 packaging/label lines that use the Omron CPM2A processor that is interfacing with the following. Noax touchscreen, GSE 650 scale head...
Replies
4
Views
14,015
Back
Top Bottom