Omron CP1H RXD?

donl517

Member
Join Date
Dec 2005
Location
Michigan
Posts
127
I am working on a program for a barcode scanner I have to send an ascii string to the scanner to trigger it. That is working fine. I am watching the same port for data coming back in but I am not seeing anything. I tried putting an always off bit in front of the RXD but I do not see any data in the register. Any suggestions?

Thanks,
Don
 
It's late, and I'm tired, but here is a bit of code I used 3 years ago, on a CQM1.
If you reply back with questions I will try to help.

RT

LD HR19.01
XFER(70) #10 DM6200 CURRENT_PROD
LD HR19.02
XFER(70) #10 DM6210 CURRENT_PROD
LD HR19.03
XFER(70) #10 DM6220 CURRENT_PROD
LD HR19.04
XFER(70) #10 DM6230 CURRENT_PROD
' When the scanner is triggered and reads a code, the CQM will read data until it sees CR/LF, then turns on AR8.14.\nWe then RXD that data (AR810 = num of bytes in buffer) into D100
LD DATA_RDY
OR 222.02
@RXD(47) DM100 #1000 AR10
SET 140.05
' Compare the scanned data with the saved product data. \nMCMP puts a 0 in each bit of CIO141 where the words in D100 and D120 match.\nOnly the first 6 bytes (3 words) will match, so bits 0,1,2 should be 0
LD 140.05
MCMP(19) DM100 CURRENT_PROD 141
' because we are only looking at the first 3 words, mask out the high 12 bits (AND #F).\nWe could have done AND #7 and compare with #0.
LD 140.05
OR AlwyON
ANDW(34) 141 #F 142
LD 140.05
ANDNOT 145.00
CMP(20) 142 #8
AND P_EQ
SET 145.00
RSET 140.05
LD 140.05
AND 145.00
CMP(20) 142 #8
AND P_EQ
SET 145.01
RSET 140.05
' Display the digit 1,2, or 0 on the ScanRequest screens, to show the operator if the scan(s) was successful
LD 145.00
@MOV(21) #1 DM300
LD 145.01
OR 146.00
@MOV(21) #2 DM300
LDNOT 145.00
ANDNOT 145.01
ANDNOT 146.00
MOV(21) #0 DM300
' If the passcode was accepted, and the Bin counter is reset, then wipe out the entered passcode
LD 146.00
ANDNOT FULL
MOV(21) #0 DM350
 

Similar Topics

Hi all, I have to say first that I have no experience with Omron devices, but here's the challenge that I'm facing. I have an Omron CP1H...
Replies
7
Views
1,699
I have a question about SET instruction in Cx-programmer. When condition goes true it is supposed to give value 1. But, my controller is giving 0...
Replies
24
Views
2,269
Hello Sir/Ma'am, Hope you and your family are safe in this Covin-19 Pandemic. One of my client have a machine in their ceramic industry which...
Replies
0
Views
2,604
Hi, I recently had to buy a batch of new electrical components containing 10 PLC Omron Type (CP1H-X40DRA) Apparently stored in store (to be used...
Replies
10
Views
3,508
Hi, i'm using cx programmer 9.5 running on my vmware and trying to connect to my CP1H- XA. I did the required driver installation suggested in the...
Replies
2
Views
2,813
Back
Top Bottom