LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing a flat sequence

Hi,

      I have a simple question on flat sequences. I have a vi that continuously acquires data from a DAQmx. I have to add some functionality to the vi to carry out a fatigue task on human subjects.

 

For that, I need to display a line on a waveform chart that alternately changes two colors every 5 seconds during run-time. I used the Plot.Color property node and added the color box vi to it.

I tried to put this in a flat sequence (one sequence with one color and the next one with the second color) and it seems to work, but I am not able to set the time to 5 seconds because of which the waveform is just flashing those colors.

I cannot use the wait 5000 ms vi because that would cause delay in data acquisition. Is there any way I can do this?

 

I tried to look for an answer to my problem in the existing discussions but I didn't find one. If in case I missed it, please post the link and I will be glad to go through it.

 

 

Thanks in advance!  

0 Kudos
Message 1 of 8
(4,506 Views)

Hi A,

 

as you didn't show your VI I would suggest using 2 (or more) parallel loops for your tasks...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(4,494 Views)

Hi!

       I re-did the program with a signal wave generator as the original file is huge. My problem is to make each frame of the flat sequence function for 5s each, without introducing time delay. Please let me know of any ideas/suggestions.

 

LabVIEW version: 8.0

0 Kudos
Message 3 of 8
(4,485 Views)

Hi A,

 

the attachment maybe shows a way. It's not perfect, but fits your question...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(4,480 Views)

Hi GerdW,

                  Thank you for replying! I tried to follow your suggestion, but I couldn't figure out how you put the ref. nodes into use. (Being not so regular with coding, I am still trying to figure out LabVIEW) Because as I see it, the parallel while loops is a great idea but the loops need to be in sync to be able to operate the VI as I want it.

 

Thanks a bunch for your time.

 

 

 

0 Kudos
Message 5 of 8
(4,436 Views)

Here is a real crude way to do what you are asking.

 

Example.png

Tim
GHSP
0 Kudos
Message 6 of 8
(4,423 Views)

Hi aeastet,

                 My question may seem a little amateur, but I am not able to figure out what/where exactly the vi called 'reference' is. Is it an invoke/a reference node? Because I searched for it in order to learn more about it, but I wasn't really successful. Also, is there any specific reason for choosing an Event Structure for the waveform generation? How much difference does it make to the while loops sync if the sinewave is replaced by a DAQmx?

 

Thank you

0 Kudos
Message 7 of 8
(4,382 Views)

...but I am not able to figure out what/where exactly the vi called 'reference' is.

Right click on the waveform graph and select Create->Reference.  You should be given a constant that is a reference to the graph.  You can then change the constant to a control if you really need to.  For the examples given, I don't thing you need to.


How much difference does it make to the while loops sync if the sinewave is replaced by a DAQmx?

It shouldn't make any difference.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 8
(4,367 Views)