Sign in to follow this  
Followers 0
Nick Trolley

ASCII STRING INTO A D2-260 PLC

8 posts in this topic

Ok to give you guys a bit of a backstory here to explain what we are trying to do - the company i work for makes the machines that print and apply those lil barcode stickers you see on fruit and such at the store. Well we have had to change the printers we use because the previous models are no longer made, and the NEW models work great except for one thing - the only way to get the "out of ink" warning is via an ascii string from the printer software installed in the panel PC this string would be sent to the RS232 programming port on a D2-260 series plc (until now we were running D2-250 (-1) series plcs) ive played with ascii data in the past but never in an automation direct product, and timing is critical because the equipment ships in 14 days (we've spent the past week trying to find any other way to get this error message) the ASCII string that we would recive from the printer software is as follows: *00000000CR -where * indicates the start of the string - CR indicates the end. Each printer on the line is represented by a 0 when its ink level is okay, and a 1 if it is about to run out so for example....... *00010010CR - would indicate printers 2 and 5 are about to run out of ink what i need to know is - -when the ascii string is sent to the plc - where is it stored? in what format? i want to monitor the memory location every 3-4 seconds and sent a fault indication for whichever lane is about to run low on ink (there are power on/fault pilot lights located above each printer location to signal status to the operator) various other fault conditions are already monitored by the plc I/O all i would need to do is add a parallel contact to my fault rungs in my program whenever the referenced printer has an out of ink warning. any help would be greatly welcomed

Share this post


Link to post
Share on other sites
with the AIN 'box' you can specify all the above, where it is coming from, the length and the vreg to save it in. AD has a pretty good help menu if you do a search for ascii it should point you the way.

Share this post


Link to post
Share on other sites
Does the printer system send the string automatically/periodically or do you have to request it in some way? The CPU port typically has problems in fast send/receive turnaround. I use the BASIC module for all string handling.

Share this post


Link to post
Share on other sites
That is a very good question - at this moment i do not know - i have left a message for the engineering guy who designed the printer software but hes currently flying back from windsor ont to cali so i won't get a reply anytime soon - would you say then my safest bet is to use a BASIC module? can this be used with the d2-250? or do i still need the 260?

Share this post


Link to post
Share on other sites
Yes, you can use it with the D2-250. If you use it download the manuals. Of course you'll be writing in BASIC. But there is a well defined method for passing information between the BASIC module and the PLC's CPU. However the cause of the string being sent you'll be reading it into a string in the BASIC module. You can do all interpreting there then just send the on/off states directly to C bits in the PLC. The PLC really doesn't have to DO anything at all, just act on the bit states. We use it to trigger thn read barcodes and make decisions on the received string. It's incredibly flexible in port setup and manipulation of strings, all the things the PLC isn't.

Share this post


Link to post
Share on other sites
I use A/D stuff sometimes but am not well versed, what are the advantages/ differences in using the BASIC over the AIN block?

Share this post


Link to post
Share on other sites
The most problems I've heard of was in a 'send request string'/'receive answer string' situation. The ASCII PRINT then AIN doesn't turn around very quickly and most of the time part of the response was lost.. I haven't had problems of my own since we always used the BASIC module.

Share this post


Link to post
Share on other sites
Well i might be okay in that case then - im not looking for real time monitoring of the string input - i just want to pole it every 5-10 seconds or so to check on the ink levels in the printer - - you know how when your printer screams at you that its out of ink, but you can still print some pages? as long as the operators aware that the ink is running out thats all im trying for - it doesnt have to be real time instantious updating hopefully it means i can use the default port

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