LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reach Technology LCD Touch Screen Driver, write a DBL

Hi All,

 

Somebody knows how to create and update a DBL indicator on a Reach LCD screen (I have the 7" model) ? There's only possibilities to update boolean, integer, chart or cursor position, but no SGL or  DBL ...

However, on the Reach Tech. website, we can see pictures of screens with decimal numbers, so I think it must be possible.

Some ideas ?

 

Thanks

Wilfried.
0 Kudos
Message 1 of 8
(3,048 Views)

Hi Wilfried,

We've used the Reach touch screens successfully on mutliple projects and all text has to be sent as a string. So you'll have to format your number as a string with the desired number of decimal places and the Reach should display it without any problem.

 

The only challenges I've encountered on smaller screens is that you are limited in the size of the string command you send. I'm not sure if later versions of their firmware fix this problem, but it used to be that if you send commands that are too long that it puts the touch screen in a state that us unrecoverable unless you reboot it.

 

Regards,

Eric Graham

Message 2 of 8
(3,023 Views)

Thanks for the reply. Are you the same guy who were looking for a full keyboard on the LAVA forum ?

 

I thought about formatting numbers into text string before send it, but how do you do to update it quickly like a live meter ? I see how to create/delete it but the update options are only boolean, integer, chart and cursor position ...

 

Best regards.

 

Wilfried.
0 Kudos
Message 3 of 8
(3,009 Views)

That might have been me looking for a keyboard a while back. The Reach examples actually provide a full keyboard. I ended up modifying their examples slightly.

 

I ended up only using bits and pieces of the NI driver for Reach. To do live updates on a number displayed on the screen you have to clear and redraw each time. If you just keep sending a new number to be displayed in the same location, it won't automatically clear what was there before, so you'll end up with numbers drawn on top of numbers. If my memory serves me correctly, I believe you can draw a box over a specific area and then draw your text over the top of that. If you're just updating a number you don't want to have to redraw the entire screen. Let's say you are updating black text over a white background - you can draw a white box over the text and then draw your text over that white square. If you are sending individual serial commands, that would require two commands sent over the serial cable. To make the whole thing more responsive, an alternative is to create a macro using the Reach programming language and upload it to the Reach with an SD card. Then you can call that macro with the new text and the macro will take care of clearing the area where the text was before and redrawing new text. By using macros you basically eliminate the need to send multiple serial commands to accomplish something. The downside is that you have to spend the time to write the macros and learn the Reach programming language even though it is relatively simple. I think the NI drivers try to eliminate the need for doing most of this, but it comes at the expense of losing some flexibility. Reach might even have some commands that try to do this for you, but maybe they support limited data types. There's a long list of commands listed in their support documentation.

 

Regards,

Eric Graham

Message 4 of 8
(2,976 Views)

By the way, we have a blog post about connecting LabVIEW to everything else.

 

http://blog.jki.net/community/cla-summit-2013-connecting-labview-to-everything-else-video-slides-now...

 

While not specifically about the Reach, it does show a demo of us using it with a LabVIEW application. You'll see the Reach at 17:00 and 20:00. All of the dedicated text areas for status information, countdown timers, etc. are updated by redrawing just the areas where the text resides. If you clear and redraw the entire screen, it ends up flashing the screen every time a piece of text gets updated. The idea is to limit what you have to clear and redraw when updating text or numbers.

Message 5 of 8
(2,974 Views)

OK Understood. It seems to be a lot work to design a nice interface, with several pages ...

Did you do some work that you can share with me, not to do all my work but to give a start point ?

Thanks a lot for your answers !

 

Wilfried.
0 Kudos
Message 6 of 8
(2,954 Views)

Wilfried,

 

To display numbers of any format, your application will need to convert the values to ASCII strings and then use the 't' command to write the string to the display module.  As others have posted, one issue is having to deal with the old contents of the screen when a new value is written.  One way to handle this without sending two messages for every value is to use a fixed-width font for the value text, and then always write the same number of characters to the field, with leading/trailing spaces to occupy unused character positions.

 

There are formatting options for use in the 't' command that handle some of this for you (e.g. padding with leading or trailing spaces).  These are described in our manual, in the Formatting Variables section.

 

We also have a tutorial on our web page that gives more detailed information about doing this.

 

Ralph Merwin / Tech Support

Reach Technology, Inc.

 

Ralph Merwin / Tech Support
Reach Technology, Inc.
0 Kudos
Message 7 of 8
(2,944 Views)

Hi Wilfried,

Unfortunately I can't provide any of our internal code as an example, mostly because before we release code to the community it has to undergo a lot of internal review and cleanup. However, creating some basic VIs that allow you to call any of the Reach commands is relatively simple. You extend the functionality of the commands you create by calling macros that you write in a text file and store on the Reach along with the graphics the macros are calling. I can tell you that the vast majority of our time was spent not on page generation, but on page navigation. To make the navigation mapping configurable (rather than hardcoded into your application) can become rather complicated depending on the desired features, logic, and behavior. 

 

Eric

0 Kudos
Message 8 of 8
(2,925 Views)