LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sink bolean pulse for int value

Solved!
Go to solution

Hi,

I need some help with my labview program. 

I want to generate BOLEAN PULSE (TRUE) for each value of for loop. I need this pulse to triger camera. 

I tried with nuber to bolean aray, but i need bolean sink value.

 

See the attachment. 

 

0 Kudos
Message 1 of 10
(3,691 Views)

Why would you connect the value of your wavelengths to a boolean LED indicator?

 

You are talking about "sinking a pulse" and also about a camera which I assume is a physical camera.  You need to have come connection to the real world.  Are you driving a digital output signal?  If so, which card and where is the code to do that in your VI?  You would need a digital output True for X milliseconds and a digital output back to False.

 

You can auto-index on the array's tunnel where it enters the For Loop.  That will allow you to get rid of the Index Array and also the constant of 5 wired to the N terminal

 

 

0 Kudos
Message 2 of 10
(3,680 Views)

Hi,

thanks for help.

That is just a part of my whole program. I am using LINX and arduino for setting digital output for camera. 

Yes I need a digital output True for X milliseconds and a digital output back to False for every iteration of for loop.

 

Can you please explain this: auto-index on the array's tunnel where it enters the For Loop (maybe you add to my vi)

 

 

0 Kudos
Message 3 of 10
(3,671 Views)

So add the digital output code to do this with DAQmx.

 

Right click on the tunnel and select Auto-Index.

 

Look at at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

0 Kudos
Message 4 of 10
(3,664 Views)

Auto index is already enabled. I just need to set bolean value to true for 100ms (to triger camera) and then set back to false. 

Alen995_0-1580057633030.png

0 Kudos
Message 5 of 10
(3,659 Views)

No, you don't have auto-index enabled.

 

And get rid of that inner while loop.

 

You already have structures in your For Loop for setting the timing.

Put the Arduino "create" stuff before your while loop, and the close stuff after the while loop.

In the For loop, before the digital on and the digital off in the two flat sequence frames that have the time delays.  Whether you want On or Off first and which time delay value goes into which  sequence frame, I don't know.  You'll have to figure that out.

 

Stop wiring your wavelength numeric value to a boolean array to the digital output.  The binary value of your wavelength has absolutely nothing to do with the true/false state of your digital output!

0 Kudos
Message 6 of 10
(3,646 Views)

Hi Alen,

 

For reference, this is what an auto-indexing tunnel looks like, and a typical usage.

Hopefully you can imagine how this could be applied to your code to step through your wavelength values.

Example_VI_BD.png

 

As a side note, this is a VI snippet (saved in 2019, possibly targeting 2015 although I've heard that can sometimes not work) which you can download and drag onto a block diagram to load in LabVIEW and test yourself.


GCentral
0 Kudos
Message 7 of 10
(3,595 Views)

Thanks, 

I manage to enable auto indexing. 

But I still have problem with setting sink bolean value. How can I set bolean value to TRUE in first time sequence and back to FALSE in second?

0 Kudos
Message 8 of 10
(3,145 Views)
Solution
Accepted by topic author Alen995

I think this gets you started on what I think you are trying to achieve. Is not the best way to do it but it gets you started.

 

example.png

Tim
GHSP
Message 9 of 10
(3,139 Views)

Thanks! That is what I wanted! 

0 Kudos
Message 10 of 10
(3,084 Views)