barcode and plc5

N9:49=2816

N9:50=21514 (typo Error Previously Sent)
N9:51=12336
N9:52=12336
N9:53=12336
N9:54=12600
N9:55=48

Sorry About The Typo On N9:50
 
If you shift mapping one byte down, you will see:

N9:51 - 12372 - 0T
N9:51 - 12336 - 00
N9:51 - 12336 - 00
N9:51 - 14384 - 80
N9:51 - 12337 - 01
 
Sorry should read:

N9:51 - 12372 - 0T
N9:52 - 12336 - 00
N9:53 - 12336 - 00
N9:54 - 14384 - 80
N9:55 - 12337 - 01

Now, if you try
COP N9:51 ST15:0.data[0] 10
MOV 10 ST15:0.len
you will see your string correctly

You problem so far, that 10 byte are not lined up with 5 integers, they take 6 integers, firs and last have one byte only
 
Something else to consider once the mapping/interpretation thing is cleared up is detecting when a new string has been sent. Since you can't tell the string length directly, the next best approach might be to detect when the first character changes. If it's not the same as it was last scan and the first character is a "T", then a tote number has been sent and the logic can be directed accordingly.
 
If you can't re-map it then you will need to use a masked move or BTD.

MOV 10 ST15:0.LEN
BTD N9:50 8 ST15:0.DATA[0] 0 8
COP N9:51 ST15:1.DATA[1] 8
BTD N9:55 0 ST15:0.DATA[9] 0 8
 
i like the brain **** idea its like most of my day

CHANGED THE MAPPING UP ONE SORRY AGAIN
I DO HAVE A PROBLEM WITH THE COP AND MOV COMMAND
I HAVE SOMETHING ALREADY IN ST15:0 SO I CHANGED TO ST15:1
I PUT COP FIRST THAN MOV ON SAME RUNG
COP
#N9:51
ST15:1.DATA[0]
LENGTH 10

MOV
SOURCE 10
ST15:1.LEN

I GET AN ERROR ON VALIDATION
ITS ON THE COP OF ST15:1
ADDRESS MUST BE SPECIFIED TO BIT LEVEL
ALSO ON THE LENGTH OF 10
INVALID OUTPUT INSTRUCTION POSITION
ANY SUGGESTIONS?????
 
I see the problem:
in PLC5 COP does not like String data.
in Contrologix it works just fine.

I will have take a break until tomorrow to test with PLC5

For now you can try multiple MOV or BTD instructions instead.
 
Set Up The Mov And Cop Like This Without Errors But Cannot Read Data

Mov
Source 10
Dest
St15:1.len

Thats On One Unconditional Rung Than On The Rung Beneath It

Cop
#n9:50
#st15:1
Length 10

What I See In The St File Is All Messed Up
The Mov Shows 21514 In The Box Which Is The T In The Barcode
So Like You Said I Would Have To Do Multiple Mov And Cop To Achieve What Is Needed
Looks Like Alot To Get What Should Have Been A Little
Oh Well Live And Learn
Hope To Get More Responses
All Are Taken Very Well And Want To Thank You All For Your Help Today
Hope To Hear More Tonight Or Tomm.
Thanks Again
Bernie
 
Cop
#n9:50
#st15:1
Length 10

N9:50 can't be used as it has an extra byte before "T"
This may work only if you shift data by one byte like I told you above.

Brute force is to use 10 BTD instructions, but this is not looking good.
BTD N9:50 8 ST15:0.DATA[0] 0 8
BTD N9:51 0 ST15:0.DATA[1] 0 8
BTD N9:51 8 ST15:0.DATA[2] 0 8
BTD N9:52 0 ST15:0.DATA[3] 0 8
BTD N9:52 8 ST15:0.DATA[4] 0 8
BTD N9:53 0 ST15:0.DATA[5] 0 8
BTD N9:53 8 ST15:0.DATA[6] 0 8
BTD N9:54 0 ST15:0.DATA[7] 0 8
BTD N9:54 8 ST15:0.DATA[8] 0 8
BTD N9:55 0 ST15:0.DATA[9] 0 8
MOV 10 ST15:0.LEN
 
Last edited:

Similar Topics

I am a student at Utah State University and am working on a project that involves a PLC-5. I am hoping some of you won't mind offering some...
Replies
5
Views
6,345
I need to link a PLC5/30, Panelview Plus 700 and a barcode scanner (currently RS232). My original plan was to use RMTIO between the PLC & PVP...
Replies
8
Views
8,764
does anyone know a simple way to allow a barcode scanner to introduce ascii to a plc5/80 e currently it is done using a sql server trying to make...
Replies
0
Views
3,667
Hello, I am trying to read a barcode scanner input using a cognex dataman 280 barcode reader, store it another string, the compare with another...
Replies
0
Views
21
Hi to everybody. I need to read the first 12 characters of the message that a barcode reader sends to the ascii card (1734-rs232 ascii) and I...
Replies
8
Views
733
Back
Top Bottom