From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lag in robotics instrument(attitude indicator,compass)

Solved!
Go to solution

Hi,
my initial program is working smoothly

inital program front panelinital program front panelinitial program block diagraminitial program block diagramSo after i implement a sound warning system.current block program.PNG
When the roll angle hit higher than the desired warning angle "60" which can be set at the front panel.The beep.vi will start to sound up,causing slow reaction to the instruments(atittude indicator,compass etc).

It then take some time(2-3 sec delay) to go back to the angle which i shift.
Note: everything is working smoothly within the set warning angle,the lag only happen when the beep.vi sound up.

From what i understand this could be due to the sensor continuously sending,the roll angle of 60 and above.This mean the beep.vi must complete a certain number of beep from the number of data it receive.So eg, receive 100 set of >60,required to beep 100 times before it get out of the t/f structure,in order for everything to work smootly again.

Any idea how i can fix this issue?

I am using labview robotics 2015,version 15.0.1.I am using arduino to input data from the sensor altIMU 10-V5.



0 Kudos
Message 1 of 4
(2,809 Views)

I have not analyzed your block diagram thoroughly but I would say that you need to use a multiple loop pattern design, like the producer/consumer design pattern. Basically, all your user inputs would be in one loop, the processing of those inputs would be done in other loops. Data is communicated from one loop to the other using queues, user events, and/or channel wires. I think that when your VI runs beep.vi, your single loop is suspended, not responding to UI inputs, until the beep.vi has finished executing.

 

I suggest that you look for producer / consumer design pattern to start.

 

good luck

Marc Dubois
0 Kudos
Message 2 of 4
(2,759 Views)
Solution
Accepted by topic author CQL

Hi CQL,

 

Any idea how i can fix this issue?

When the Beep is causing lags you should put it in its own (parallel) loop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 4
(2,755 Views)

Here is a very simple example of a producer-consumer loop using a channel wire.

Producer-Consumer Channel wires.png

Marc Dubois
Message 4 of 4
(2,738 Views)