Directlogics/ASCII

wingshooter25

Member
Join Date
Jun 2005
Posts
5
Hello. I am in need of some direction on communicating in ASCII between a Automation Direct DL260 processor and a custom made display/LED Sign. I have no experience with ASCII or setting up communications, but I have done extensive research over the last couple of days and figured most of it out. I have placed the data in consecutive v-memory locations. I'm pretty sure I need to use the printV instruction to send the information to my display. My problem is that I need to separate my double words(v-mem.) with commas before send. I have learned that comma is 2C in hex. Any advice on how to slip these into the string I need to create would be appreciated.
 
Last edited:
Off the top of my head, I would think you could just enclose a comma character within quotation marks, right between your V-memory data.

Basically this: Vnnnn "," Vnnnn

Although it doesn't specifically answer your question, have a read through THIS thread, as well as the links to the other 2 ASCII dicussions.

Icky might be able to offer some suggestions as well.

🍻

-Eric
 
Thanks for the vote of confidence Eric. It could be done, but it would take being pretty tricky about it.

Offhand without really making a program and trying it out, it might be something like this brute force method. I haven't had time to put it in a PLC to see if it works exactly right or not, but it should be close. :)

Convert the double word to BCD (if it isn't already). We will assume the BCD double word is in V2000. V2100-V2103 is used as a working set of registers, V2200-V2204 is used as the final set of registers.

LD k4
LDA o2000 Convert BCD to ASCII
HTA V2100

LDD V2100 Move the first four numbers to
OUTD V2200 the final ASCII table

LD V2201 Insert the comma
AND kFF
ADDD k2C00
OUT V2201

LDD V2101 Move the second set of four numbers to
SHFR k8 the final ASCII table
OUT V2102

LD V2203 Insert the comma
AND kFF (probably not needed this time, but oh well)
ADDD k2C00
OUT V2203

LD V2103 Move the last two numbers to
OUT V2204 the final ASCII table
 
Thank you for your responses. Unfortunately I have been sidetracked on another project for the last couple of days. Icky's solution looks like it might be what I was looking for. I will let you know as soon as I do. I do not know the instruction set for this particular brand of plc as well as I know Allen Bradley. At a glance it looks like you are moving the numbers to a different register, shifting them and logically anding the comma? I will give this method a shot. Your help has been greatly appreciated.
 
Hello. I have gotten back to writing the logic for the previously mentioned topic. I am using the example Icky has given as a layout for my own. There are a few things confusing me however. In the previous example it looks like the comma is being put between a value at v2000 and v2001. Is this the case? In my situation the values are already double words the comma would have to be inserted like this V2000/v2001,V2002/v2003. I noticed in the manual that when converted to ASCII twice as many V memory locations are consumed per value. I think? Is this taken into account in the example shown? Also I do not understand the "AND kFF". I was assuming the FF to be a hex value. It will not let me enter this.

Please help me to understand. Thanks for your time and patience.
 
Does the VPRINT instruction not do a proper job of formatting a string so that it is ready to be sent out using PRINTV? I have used this pair to insert information into a spreadsheet function in a Cognex vision system. It was easy to use. You simply have to remember to give the VPRINT instruction a little time to complete before callin the PRINTV instruction.
 
That sounds like it could work if I had a pc nearby. My problem here is this is a stand alone system and my LED display only recieves data. So my problem is trying to format the data to use soley the print v instruction. The sign has to recieve the sring as such : ######,######,######,######,######CRLF. I have to have this thing working by the end of the week. I am desperate for anyones help that can help me solve this issue.
 
Please excuse my silliness for not reading your post carefully enough the first time around. What Eric said should work.

PRINT V2001 V2000 "," V3001, V3000 CRLF
 
Thank You very much. It seems I was headed down te wrong path to begin with. Originally I had spoke with someone at customer support who said I must use the printV instruction. After the last post I made a co-worker called tech support again and this time we spoke with someone who told us to use the print instruction. What a breeze. You would think with all of the reading through the manual I would have found this myself. To say the least it was a learning experience. With the print instruction being so easy to use; When would the printV command be used?
 
wingshooter25 said:
When would the printV command be used?
Good point. I didn't realize the PRINT instruction allowed embedded variables. I figured I had to VPRINT to V-memory, then PRINTV out the port. Looks like I could have simply used the PRINT instruction for my application as well... :oops:

🍻

-Eric
 

Similar Topics

Hi, We couldn’t find anything specific, so am starting a new thread. I’m trying to migrate a config from a ML1400 to a micro820 & am experiencing...
Replies
1
Views
93
I have an L24ER-QB1B with a 1769-ASCII card in slot number 4. I'm looking to send data to this zebra printer after every completed sequence. I'm a...
Replies
2
Views
442
Hi to everybody. I need to read the first 12 characters of the message that a barcode reader sends to the ascii card (1734-rs232 ascii) and I...
Replies
8
Views
725
I am trying to import addresses and symbols from a PanelBuilder32 application into the RSLogix 5 Address/Symbol database - however each time I...
Replies
5
Views
534
Good day! I am working on a project at our campus to integrate fleet vehicle chargers with load management so we don't overwhelm our service. The...
Replies
37
Views
3,817
Back
Top Bottom