New user with a question about rs232 to device

jreinhold

Member
Join Date
May 2007
Location
PA
Posts
2
I am trying to send a hexideximal command to an imaje inkjet printer for a SLC 5/03 via rs232. I have figured out the cable connections between the two, but I need to know what command/ladder logic to use. I am using RS Logix 500 and the command I need to send to the printer is 02h (initiate), message number , 03h (end). This should be pretty simple but I don't know anything about this as I believe it would use the MSG command. Please help!!!
 
Try use ascii control AWT instead, and set you channel 0 system configuration to shutdown, and channel 0 user configuration to ascii
 
If i were to use the AWT command would it be transmitted in hexidecimal? and if so then how could I go about setting that up in a program designed just to do the send 1 time as an example. Thank-you
 
You'll need to send it as an ASCII command. Look up AWA, ascii write append. Its been a while since I had to do this, but I used this to send a set of AT commands to a modem way back when. You'll wind up storing your commands in R6 registers. I think you're also going to need to use ACL and AHL to prepare the port. Or maybe I just had to do that because after I sent the AT commands, I had to send regular df1 data.

Hopefully you can find an example somewhere. I kinda doubt I still have the program I did. But if you still need it tomorrow, I can look through the SCADA Application Guide. Pretty sure thats what I used as an example.


-jeff
 
Regarding the question of whether the ascii commands can send hex data. Yes. You just need to translate the hex into ascii for the PLC.

See its all basically the same, its all packets of 8 bits (Of course, for hex, you will have an even number of those packets), the printer will just see a bunch of 1's and 0's come over the line, it wont know or care if the PLC was trying to send it ascii, or french, or any other language, as long as the total number of bits is divisible by 16, it'll be happy and do its best to comly. I think there are a few exceptions to this, some chars that are illegal in ascii (I think). But I'm not positive the PLC even cares whether the chars are legal. I think if you can paste it in there, it'll send the data. Find a chart that gives hex equivalents to all the ASCII chars. Like this one http://www.ascii.cl/


-jeff
 
Last edited:
yes you can send hex with ascii, if you create a word as 0302h and send it with AWA/AWT, it should be ok. i couldn't find my sample any more, if i can find it, i will send you the sample.
 

Similar Topics

Hi all, Well, here I find myself at a former client after I left water treatment trying to help him get the plant back up and running after a...
Replies
2
Views
1,024
Hello all, I've been working on a siemens PLC system using an S7-1200 and a KTP400 Basic HMI. Essentially this system takes in some setup...
Replies
3
Views
1,349
Wondering if anyone here has commissioned an FMP53 guided-radar probe and is familiar with the current output when the sensor is in blocking...
Replies
5
Views
2,447
I have my 1756-EWEB card working great except for one detail. I'm having problems changing the 'Administrator' password. I can log in and add...
Replies
0
Views
1,405
Hi.. I am making some improvements in a flexible project. And I have a page that is password protectet. I have createt a usergroup called...
Replies
1
Views
3,409
Back
Top Bottom