DirectLOGIC PLCs - the most practical PLCs in the industry......from AutomationDirect go back to Do-more home AutomationDirect online store

Spend Less; Do More

Do-more™ PLC & ViewMarq™: How to read an ASCII status reply from a ViewMarq Display

Video Transcript:

Suppose you want to know if the ASCII message got to the ViewMarq ok. No problem. Just make sure the "ASCII Reply" option is enabled here in the LED Display Configuration. That's this checkbox right here. That's it. Ours is already setup, so we just close it out. When you create your message, make sure you create that message with an ID that is not zero. Remember, zero is a broadcast message.

Back in the DoMore software we simply add a STREAMIN instruction to our code. This is the simple ASCII message example we did in a previous video where we just format the message here and we send it out the serial port here.

To read the response back from the ViewMarq, all we do is add a STREAMIN instruction.

We want to read from the internal serial port, and we'll read characters until we fill up our buffer or we get that single carriage return the ViewMarq is going to send back to mark the end of the message.

And let's go ahead and put that result into a string long 10. How about that? That's all there is to it.

Let's enable this instruction with switch X1. Now while I am using an edge triggered contact here, I really didn't need to because this instruction is already edge triggered.

So again, all we are doing is formatting the string, making sure the ID is not zero, sending that string out the serial port, and then reading the serial port to see what the reply from the ViewMarq is.

Let's go ahead and accept our changes, save it, write it out to the PLC. Let's turn on the status for everybody so we can see what is going on.

So I'm going to reach down and toggle X0 on this processor... that created the message for us. You can see that message appeared in String Long zero right here and that it's length was 234 characters.

Let's go ahead and add our string long 10 for the result right here. And let's go ahead and add our length too. So now that we have formatted our string and placed it in String Long zero, I'm going to toggle X7 to send that message down to the ViewMarq. So now I just reach down to the DoMore and toggle X1 and sure enough we got a message back from the ViewMarq saying everything was ok and it was three characters long. Now we know the message was successfully received by the ViewMarq.

The key points here are: send the message to a single ID, not the broadcast ID of zero, and make sure the ASCII reply is configured in the ViewMarq.

That ought to be enough to get you going. Check out the other videos for doing the same thing using Modbus and other advanced features.

Let us know if you have any questions. Automation Direct Customer Support is always free and just a phone call or e-mail away.

Spend Less. Do More. From Automation Direct.


Check-out all the Do-more™ Videos

  The Do-more Way
  Do-more Designer Software
  Do-more Ethernet I/O
  Do-more Motion Control Videos
  Do-more with ViewMarq Message Display

User Application Stories
Encompassing all AutomationDirect PLCs

Helpful PLC guides



Copyright © All rights reserved.All prices are U.S. list prices.