LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

If I shake windows of VI's, does not run the code.

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

0 Kudos
Message 1 of 8
(2,617 Views)

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.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 8
(2,614 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 8
(2,612 Views)

I expect that Norbert is right. It's time to read about Multitasking in LabVIEW and move your CAN code to another execution system.

0 Kudos
Message 4 of 8
(2,601 Views)
ok, I understand what you tell me,
but I have to implement in the UI thread.

One solution would be to add a inhibit time to the variables that are Into the UI thread. (eg, make the change of the variable if it changes and it is stable during 0.5 seconds) so small interference would be canceled.

is there a way to do it automatically?
I hope you understand me

thank you very much
0 Kudos
Message 5 of 8
(2,593 Views)

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.

0 Kudos
Message 6 of 8
(2,585 Views)

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.

0 Kudos
Message 7 of 8
(2,575 Views)

@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?

 


 

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