06-01-2012 03:18 AM
I have many VIs called from a VI and thus run in parallel, a VI has a DLL that allows me to communicate via CAN. If I minimize and maximize windows to be changing the VI's or I shake the window, the communication CAN be lost for a moment (And it breaks my comunication system).
I use windows XP.
Some solution? Is this normal?
Thanks
06-01-2012 03:28 AM
I am not good with CAN communication but I am giving my opinion by keeping TCP/IP. So what happens when you shake the window is your OS will take time to handle the events and that will be running faster eventhough if it runs for a very short duration ( Like running a while loop without delay ). So your OS will not be able to service the task for the TCP/IP for that time and that may give a break in communication. This we evaluate when we run RT we plot the timing of RT and use to shake and do all other activity that take max CPU usage and affects TCP/IP communication.
I am not sure whether this is a solutin but this should have given you an Idea about the scenario.
06-01-2012 03:30 AM
This for instance can depend on how you transfer data from/to the user interface you are "shaking".
Another (more) possible reason is that you are running components in the UI thread. By moving the window, you are "loading the UI thread" with additional computations hence preventing it to perform other tasks (e.g. calling into your DLL).
Norbert
06-01-2012 03:50 AM
I expect that Norbert is right. It's time to read about Multitasking in LabVIEW and move your CAN code to another execution system.
06-01-2012 04:24 AM
06-01-2012 04:39 AM
Sorry, I didn't understand.
Another way to prevent you from interfering with the UI is
- Do not show the title bar
- Do not show any scrollbar
- Do not allow to resize the window
Thus you get a window with a fix position and no longer can "shake" any part of it.
06-01-2012 04:53 AM - edited 06-01-2012 04:59 AM
I need to constantly change VI's because I have multiple VI's with control panels
I try to explain again:
I want that the global variable does not change until you take for example 0.5 sec changed:
0s-> IN: TRUE, OUT: TRUE
0.1s-> IN: FALSE, OUT: TRUE
0.2s-> IN: TRUE, OUT: TRUE
0.3s-> IN: FALSE, OUT: TRUE
0.4s-> IN: FALSE, OUT: TRUE
0.5s-> IN: FALSE, OUT: TRUE
0.6s-> IN: FALSE, OUT: TRUE
0.7s-> IN: FALSE, OUT: FALSE
Thanks.
06-01-2012 07:12 AM
@Felipevv wrote:
I need to constantly change VI's because I have multiple VI's with control panels
I try to explain again:
I want that the global variable does not change until you take for example 0.5 sec changed:
0s-> IN: TRUE, OUT: TRUE
0.1s-> IN: FALSE, OUT: TRUE
0.2s-> IN: TRUE, OUT: TRUE
0.3s-> IN: FALSE, OUT: TRUE
0.4s-> IN: FALSE, OUT: TRUE
0.5s-> IN: FALSE, OUT: TRUE
0.6s-> IN: FALSE, OUT: TRUE
0.7s-> IN: FALSE, OUT: FALSE
Thanks.
I don't understand how it would help with your CAN problem, but does this do what you want?