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 Send Short ASCII Messages

Video Transcript:

In this video we’ll see how to use a DoMore PLC to display a simple ASCII text message on a ViewMarq Display. Right Click in the project browser and select system configuration. We are going to use the on board serial port in this example so select the CPU configuration, and change the serial port to general purpose, and hit Device Settings. The ViewMarq we are using is setup at the default 38400, 8 data bits, one stop bit, odd parity, and we’re not going to use any flow control for this example.

Step 2: Format the string.
Add a PRINT To STRING instruction, and over in the ViewMarq software, hit the copy button to put a copy of this string on your clip board. Come back over to the DoMore software, and paste it in. A couple key points: make sure the string is enclosed in double quotes – I’ll put one here, and one down here at the end – and make sure you add a termination character to the end. The ViewMarq expects a carriage return which we can represent with a dollar sign zero D. Now I like to add the double quotes around just that to remind myself that I added that. It’s perfectly OK to do this – it is the same thing. We want the string to be placed into the string long variable, because a string short is only 64 characters. If we look back at our ViewMarq software, we can see that this string is 162 characters. That wouldn’t have fit in our short string, so we’ll put it in a long string which is 256 characters. This all looks good so we’ll hit ok.

Step 3: Send the string to the ViewMarq with a STREAMOUT instruction.
We want to send the message that we put in SL0 out the internal serial port. That’s it for that guy. Now we need to control these instructions. Notice that they are edge triggered as designated by these triangles. So I’m going to say on the rising edge of X zero, we’ll format the string. And on the rising edge of X7 we’ll send it out the serial port. I have an input simulator plugged into this DoMore so I’ll just reach down and flip those switches when the time comes. Ok, we like that, so say ACCEPT, Save it, write it out to the DoMore, and we should be good to go. Make sure status is on.

Let’s bring up a data view, so we can watch this string variable here, SL0, and while we are at it let’s keep an eye on the length of that variable so we can see how many characters he has in it. Let’s go ahead and clear that variable out just so we can see what happens. I’ll just put some random characters in here. Ok, so now we have four characters in that variable, and the length is four. Perfect. I’m going to reach down to me DoMore and flip switch X0. And sure enough, this string was copied into SL0 which we can see right here. And there is 165 characters in that variable. Which makes perfect sense because if we go back and look at our ViewMarq software, we can see that there were 162 characters and then we added that carriage return which added 3 characters. Now were at 165 characters which is less than the 256 the SL0 can handle so we’re in great shape. I’m going to flip that switch off and I’m going to flip switch X7 to send that string to the ViewMarq. And just like that, the ViewMarq is updated. And all we had to do was format the string, and send it out. Easy.

Well, that ought to be enough to get you going. Check out the other videos in this series to learn more about how to use the DoMore with the ViewMarq LED display. And let us know if you have any questions. Automation Direct’s customer support is always free and just a phone call or email 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.