ASCII issues

T Gibbs

Member
Join Date
Jun 2012
Location
Morristown, TN
Posts
406
I have a Keyence vision system (camera which will read text and output what it reads in ASCII) and a Productivity 2000 PAC. I am sending the ASCII data via RS232. On the Keyence output monitor screen it says that it's outputting numbers, like 076,077,083,etc., but in the PAC it shows up as a bunch of random symbols, like degree symbol, a diamond with a question mark, a Y with 2 dots above it, an I with a mark above it, etc. When the camera sends the same set of numbers back to back, the PAC does not display the same symbols. I talked to AD tech support but they didn't have any answers. Anybody here seen this kind of stuff before, or have any insight as to what the issue is?
 
You may need to do a byte swap of the incoming data. Words may be represented in big-endian or little-endian format. With big-endian the most significant byte of a word is stored at a particular memory address and the subsequent bytes are stored in the following higher memory addresses, the least significant byte thus being stored at the highest memory address. Little-endian format reverses the order and stores the least significant byte at the lower memory address with the most significant byte being stored at the highest memory address.This means that the order of the bytes are being sent in one format and read in the other, giving you incorrect characters.
 
There may be a mismatch in the RS232 port setup between the sending and receiving sides. Perhaps the number of data bits or stop bits. The sending side is using more bits per character than the receiving side is expecting. I could also be a baud rate mismatch.
 
If the Baud, Data Bits, Stop Bits, Parity, Character Set are the same, then it is your cable.

Only because it hasn't been mentioned, what parity are you using in the keyence?
You mentioned ASCII, the only format available for the PAC. Can you confirm with the Keyence Code that it is deinitely using ASCII and not some other? Although the fact that it never gives the same value is weird. Does it have encryption?

Tell us about the cable you are using?
What was the part number of the cable?
If you rolled your own cable, what cable spec did you use?
Was there soldering involved?
How Long was the cable run?
Did you crimp the connector properly?
Are there any terminals used?
Does it run past a big VSD or similar sort of noise?

Failing that, I would buy an RJ12 to RS232 converter, plug the Keyence into your PC and use hyperterminal (or putty) and portmon to see if you get what you were expecting. I would also plug the PC it into the PAC and try typing using hyperterminal and see if you get what you expected.

Do you have the Keyence Part number so we can troubleshoot further?
 
Parity on both is odd. Baud rate is 38.4, the cable is just a straight through rj12. It's only about a foot long. What did you mean by "character set" ? I've not seen that in any of my settings. The Keyence is a CV-X252AP
 
For reference, In the PAC, can you CPC the characters from the received ascii to integer array so that we can look at ascii codes instead of rendered characters.
 
Parity on both is odd. Baud rate is 38.4, the cable is just a straight through rj12. It's only about a foot long.

For a test, try a much lower baud. 2400 - 4800. If it works there, it may be a cabling issue.
FYI: I do have problems communicating with TDK/Lambda power supplies at anything higher than 1200 with
P3K/P3-550 cpu and the FW rev(1.1.14.39?) that came out with SW Ver 1.9.1.
The issue may have originated at SW ver 1.8.(FW 1.1.13.24)---- 1.8 did not last long enough to test comms.

With the FW rev for SW 1.7.1(FW 1.1.13.17), I have NO problems with 19.2K.
 
I assumed that, since it is the default.

I have looked at the bitpatterns of your screenshot data.
I have attempted to match any (swapped/inverted/MSB-First) patterns.
I cannot make a correlation between what Keyence shows as sent and what PAC shows as received.
 

Similar Topics

I have an Aczet CZ series weigh scale hooked up to a MicroLogix 1400 PLC through port 0 (9 pin serial). The software being used is RSlogix 500...
Replies
50
Views
10,488
Hi, We couldn’t find anything specific, so am starting a new thread. I’m trying to migrate a config from a ML1400 to a micro820 & am experiencing...
Replies
1
Views
94
I have an L24ER-QB1B with a 1769-ASCII card in slot number 4. I'm looking to send data to this zebra printer after every completed sequence. I'm a...
Replies
2
Views
448
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
729
I am trying to import addresses and symbols from a PanelBuilder32 application into the RSLogix 5 Address/Symbol database - however each time I...
Replies
5
Views
539
Back
Top Bottom