Sign in to follow this  
Followers 0
remspot

Sending Ascii from PLC

4 posts in this topic

I have an omron cp1le plc and a sato s84ex printer I need to learn how to send print jobs to it. I know I can use the Serial card option and send the code to the printer over RS232. I am using the NiceLabel software and printing to file which extracts the SBL code. That is where I am stuck. What part of the code do I use and where do I put it in the CX-Programmer. And what instructions should I be learning to send Ascii to the printer. I am very new at all this and just want a few hinters and direction. Thanks.

Share this post


Link to post
Share on other sites
You configure the PLC for "No-Protocol Communications" and use the associated TRANSMIT [TXD(236)] and RECEIVE [RXD(235)] instructions as outlined in the manuals. You need the all the relevant instruction codes and port settings for the printer to successfully communicate with the PLC.

Share this post


Link to post
Share on other sites
For clarity, for anyone else trying to learn what I am trying to do I opened the settings in CX-Programmer and selected the Serial Port 1 Tab. I selected the standard communications settings (9600, 1, 7, 2, E), Start code set to Disable and Received bytes at 256 and set Mode to RS-232C. I used nicelabel to create a label using SATO fonts and selected the print to file option. This made me save it to a location. I then opened that file with notepad and copied the text. I created a rung in cx programmer like this below. I opened the memory and chose d200 and clicked the "a" symbol to show values in text. I then pasted the previous values in that location. I then wired up a serial cable from the CP1W-CIF01  serial option board to the serial port of the S84-EX printer. I used this diagram to create my cable: .      I loaded all the memory values and program to the PLC and closed W500.00 and the print job sent to the printer. Now I have to figure how I can hook my computer directly to the PLC and get the print to file to automatically store that code in the D values. Or be able to modify the Dvalues real time through an HMI to change print quantity, etc.                  

Share this post


Link to post
Share on other sites
Hello, so to clarify things, are you already able to run the printer from PLC using the method stated above? If so, you just need to look at the strings that you have pasted on D200 area, then make a new print job with different parameter and compare what's changing there. That way you'll understand which word are is for what.   But actually the easiest way to do it is that you need to have the communication manual for the printer. If they open the protocol, there should be data packet configuration listed, then you just adjust the content of D200 onwards (either from HMI/other thing) directly. So no need to copy-paste from NiceLabel everytime you need to change the print job.

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
Sign in to follow this  
Followers 0