Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Touch panel aplications architecture

Good Morning,

 

I am a rookie in Touch panel applications, thus I need to know the architexture philosophy of building a vi which will be deployed on a Touch panel. To explain more what I mean please have a look at the attached simple vi. This code works fine in a PC however if you deploy this on a Touch panel you will see the ring control flickering. Thus, it would be nery important to advise where can I find information concerning programming for a touch panel application.

 

Best Regards 

0 Kudos
Message 1 of 5
(3,958 Views)

thorfano,

 

Whenever you use while loops, be sure to put a 'wait' function in there.  Even a wait as small as 10ms makes a huge difference in the processor time saved.  A PC can crunch numbers much faster, wheras a touchpanel has less processor to utilize, hence the flickering on the control you see.  Go ahead and put that wait in there and see if it makes a difference.

 

As for application architecture,your best bet is to look at the examples we include in the example finder (help->find examples) From here, browse to Toolkits and Modules-> Touch Panel.  There are many examples here, but I would start in the general folder since these are easier examples to follow.

 

Let me know if you have any questions!

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 2 of 5
(3,936 Views)

Thank you for your reply. I appreciate the help.

It’s something else that I would like to ask. Touch panel needs around 35-40 seconds to load my vi. This means that although the front panel is visible from the first 3-4 seconds the loading is completed after 30 to 35 seconds. From that moment everything seems in order (concerning the speed of code execution). Do you think that I did something wrong? If not, what should I do to overcome the problem? e.g. my front panel is placed on a tab control and I though of make it invisible for the crucial time period of the 30-40 seconds, thus when the tab will become visible the vi will have been fully loaded.

Finally, I want my vi to be visible on start up, what I have to do is just place the vi exe in the touch panel start up folder?

 

Thank you in advance

0 Kudos
Message 3 of 5
(3,926 Views)

Yup, just put your executable into the startup folder and it will run on startup.

 

I have seen some larger touch panel apps take a bit to load, but 35-40 seconds seems like a long time. Have you tried making a very simple application and seeing how long that takes to load?

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 4 of 5
(3,902 Views)

Good Morning Robbob,

 

Yes, I tried a simple application (a boolean open a DO channel) and there is no delay. The long loading time is no problem for me (since the delay has to do only with loading time). If the front panel doesn’t appear before the loading has been completed I suppose that the unit operator has no problem to wait a few seconds. What it doesn’t seem right to me is that it is not obvious that the vi hasn’t been fully loaded. The front panel seems ready altough it is not. I will explain better with an example. I am using a system radio buttons control that it is supposed to be hidden when the vi starts running and becomes visible when something else is happening (a specific item is selected by a ring control). However, the aforementioned system radio buttons control is visible and hiddens only after vi is fully loaded (as is expected). I would appreciate any possible suggestion-advice.  

 

Best Regards

0 Kudos
Message 5 of 5
(3,896 Views)