ASCII DATA - transfering

mjamil

Member
Join Date
Apr 2002
Location
PK
Posts
162
Every once in a while I have a device with a built in interface for RS-232 etc., never used it because one way or another there was a easier way out (using the discrete inputs/outputs for that device)

........ Until now..... :unsure:

I want to know the basics for Data transfers between two devices, PLC <-> Computer, or PLC<-> weigh modules, or PLC <-> printer, etc.

I have observed ppl working on Barcode readers and sending the data via Hyper Terminal (in a PC)

I was just thinking of testing this, using my PLC (S7-2xx) to transmit Data to a PC (or a printer). no project actually, but just to utilize my time as I think once I get to know how Data can be moved to/from a PLC, I can atleast consider using communication ports that I have been leaving to rust so far!

Thanks all
 
Hi MJamil,
I think your best bet is what you've already mentioned, that being using hyperterminal.
A few months ago I used a DL-06 plc for a "pick to light" project, and this was my first time doing RS-232 data exchange. For debugging/setup/troubleshooting, I simply connected to hyperterminal via my PC com port.
It should be just as straight forward for your application as well.

Good luck,

Mike

sorry, i just re-read your post and I don't think I gave you the info you wanted. If you use hyperterminal, you need to assure you have it configured the same as the port of your plc. Namely, you'll have to specify baud rate, # of bits, parity, stop bit, flow control. I think the default standard is 9600 baud, 8 bits, no parity, and 1 stop bit.

Just make sure your plc port configuration matches what you specify in hyperterminal.
 
Last edited:
Thanks for the info.

I am going to try to transmit data from my PLC (s7-22x).

I've gone thru the SMB30, the PLC is going to be configured as follow:

Baud rate 9600,
No parity,
8 data bits,
1 stop bit,


Now what confuses me is, that, during a discussion with another person transmitting data from the PC to a MESSAGE DISPLAY, he mentioned that I shoudl take care that following is accomplished,

Data must be a 7-bit Ascii
start bit STX 02H and end bit ETX 03H.


I assume the STX and ETX are a PC's terminology, if so what exactly am I looking for in a PLC command list?

should I use the transmit command (XMT) only or are there any prerequisites apart from the configurations?

How do I take care about the 7-bit Ascii to be maintained?
(As that DATA from my PLC consists of Real numbers, interger, etc, etc. obviously I will need those to be translated but gets more complicated as I try to display two types of data in a single message, i.e., Interger+D.byte)
 
Hi
If you're just transmitting ASCII to Hyperterminal, then the baud rate, stop bits... doesn't matter, as long as they match.

This is only important when talking to a third-party device and they have specified the ASCII parameters.

Get an ASCII lookup table from this link

The STX and ETX that your friend mentions can be seen here. By transmitting a 2, the remote device sees this as STX. A lot of devices I use need a 'Carriage return' at the end, which from the table is a 13. You need to remember that this 13 is a CR, not a number 13.

You are correct - you need to use the XMT instruction. You may want to then use the RCV instruction because the third party device will probably reply with a "Got that" message.

If I'm transmitting an integer, I break it down to individual characters i.e.
23 would be ASCII 2 then ASCII 3 or
50 then 51 (using ASCII representation)

Again, the third party device will dictate how it wants the data to look.

Tip: converting a digit 0-9 to ASCII can be done by adding 48, or SETting bits 4 and 5 in the byte. Doesn't work for anything else, though.

pp
 
thanks for the info.

could you eloborate what I should be doing if I need to trigger a message on my display.

"Machine Speed is xxx" (where xxx represents any other type of data than the normal text)
 
The thing that is confusing me right now is that the tech guy says I need to output a 7-bit ASCII to be able to use his display.

now what exactly does he mean by a 7-bit ASCII, I know real numbers, integers, D/Int., etc can be converted BACK and FORTH to ASCII (pronounced ***-KEY, weird heh! :oops:

can someone please shed some light on this, as well.
 
I didn't realise you had a specific display to use. Really, you've got to get the information you need from their technical literature.

Post back specific questions and I'll try to help

Good luck

pp
 
Unfortunately, they dont have any literature on communication, mostly as they provide complete solution rather than sell hardware, where as I need thier hardware, u can imagine the cost for a single line x 8 characther LED display is US$100/- (with RS-232 port, other options available)

What they do is, for commercial signboards, either they attach a computer and transfer data to this display using thier propritery program, or they program the required message(s) in a EEPROM and it runs in cycle.

What I am trying to do is, buy thier hardware, and (try to) integrate it with my PLC, so that any message to be displayed, is transmitted from the PLC's port to that of the display.

he though agreed that I can take my PLC and wire it with his display if I am succesful, I pay and get myself a display! otherwise, the other option was to trigger the already program (in EEPROM) from discrete inputs of the DISPLAY (too much messages would mean too much PLC outputs utilised)

I've also seen RS-232 ports on one of the LOAD CELL Indicators I recently used, but since I got away with the discrete INPUTs and RELAY OUTPUTS of the indicator, I didnt get involved in this.
 
Any suggestions guys???

Any experiences to share?????

I'm really confused :confused:

and I consider it to be inappropriate, to go over to the Display vendor with my PLC for checking the program, and come over here to ask more questions, and so on....

I'm guess I'm not confident / satisfied with my self bawling
 

Similar Topics

Hello, Thanks in advance. How can I send more than 82 characters using AWA or AWT? to Zepra Printer via serial Rs232 communication? Normally I...
Replies
1
Views
795
Does anyone know how to inhibit the 232 module from sending data during PLC power-up? To send data during normal operation, the Transmit Record...
Replies
3
Views
1,920
I am working on a project, inside an AB CLX, I implemented the Modbus TCP Client AOI published on AB website, to interreact with a Modbus ASCII...
Replies
7
Views
3,625
Hey working on a project where I need to send a String Command to a device in order for the device to perform an operation. It's over Profinet but...
Replies
2
Views
1,888
Hello all, as you probably are all aware I have been trying to interface an A&D GX4002A balance to a 1769-L24ER-QBFC1B controller by the use of a...
Replies
7
Views
1,523
Back
Top Bottom