キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ1/8
6,045件の閲覧回数

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 件の賞賛
メッセージ2/8
6,033件の閲覧回数

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 件の賞賛
メッセージ3/8
6,024件の閲覧回数

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 件の賞賛
メッセージ4/8
6,019件の閲覧回数

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 件の賞賛
メッセージ5/8
5,975件の閲覧回数

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

 

Example.png

Tim
GHSP
0 件の賞賛
メッセージ6/8
5,962件の閲覧回数

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 件の賞賛
メッセージ7/8
5,921件の閲覧回数

...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.



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 件の賞賛
メッセージ8/8
5,906件の閲覧回数