sttchui

Mitsubishi PLC Q series to Sato printer using Rs232

4 posts in this topic

Hi, I need some help on how to write the command to print a string of ASCII code to a sato printer The sato printer model is CL4NX (2 unit) i using the serial port rs232 linking to my PLC serial communication card QJ71C24N-R2 to print from either one of the sato printer i have put my C24 card on slot no.4, the communication module seem to working alright, both RD & SD light are transmitting when i call the program But i still unable to call the printer to start printing the string, anyone can teach me how to program used the STX, ETX command of the sato printer? i have attach my program too, where or what command sld i be using to link with teh sato printer i using cross cable linking to my pc, i can see the sato print sending some command D1 or D3 when i put it online or offline. i using 232 analyzer to print but nothing ever happen The plc program i put D60 for channel selection KRPRINTERPLCREV1.3.rar 232.pdf

Share this post


Link to post
Share on other sites
First, most printers need STX (Start of text) at the beginning and ETX (End of text) at the end (but before CrLf) to process the string. You can find the hex ascii codes of STX/ETX in any ascii table (google search). Then, transfer the complete string (as you do with $1234....) including STX, ETX and CrLf. I would suggest that you connect your computer with the RS232Analyzer software against the C24 card, to see what the PLC is actually sending on the comm port. You will then get an overview to see what the PLC is actually sending on the port. Then you can start making the needed changes in the PLC program, and then at the end connect it to the Sato printer. One problem could be (if the C24 card is in word-mode): In word mode, the C24 expects two bytes in each register, and since STX and ETX is one byte each, and you need STX at the beginning and so on, you will have to shift in the next bytes with an offset of one byte IF the Sato printer does not accept 'null' as a valid character to "skip". This means that the printer gets "messed up" if you use 'null' in your string. IF the printer supports 'null' inside the string, then you can use STX/'null' in the first word, then send your string, and the send ETX/'nu'' plus CrLf. Anotoher solution is to put the card in byte mode. At this point, you only use one character in each word, hence you will get a program that uses ETX in the first word, then one character (not two like you are using now) per word in the PLC, and apply ETX and Cr in one word, then Lf in the last word. Solution one (words starting from top to bottom): STX-1 2-3 4-5 ... .. G-ETX CrLf Solution two (words starting from top to bottom): STX 1 2 3 .. .. ETX Cr Lf But as mentioned, look at what the PLC is actually sending out on the comm port before continuing sending data to the printer. That way you can debug the PLC without stumbling in the dark.

Share this post


Link to post
Share on other sites
Hi Mr. Kaare_t thank you for the information, i trying using the 232 analyzer as you suggested, i try manually input the code to the print using my rs232 port no.2, monitor using port no.1 i can see the analyzer shown the correct output shown my attachment 25,26,27, however i still unable to print anything out From the sato printer control i have check baud rate 9600 even 1 Cable rs232 straighten type it is sending feedback to my card which i can see the RD light in C24 turn on/off, if i used a cross-cable the sato and plc will be error i can see in the sato parameter for control DEFAULT SETTING SOH 01 STX 02 CR 0D CNTBY 5E it is no responding to any of my command code, could be my program problem is still something wrong, or i need to program different for this barcode printer???? rsport25.pdf rsport26.pdf rsport27.pdf KRPRINTERPLCREV1.5.rar

Share this post


Link to post
Share on other sites
PS: i just go through sato web site apparently they have different code for starting print string for start print command code start print ESC+A = H411B i think i will try this tomorrow if to see it work or not. correct me if i am wrong, sato start print does not use STX command instead their own code. CL4NX_Programming Manual code1.pdf
1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now