LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a sequencial value of boolean array

I want a 1D boolean array outside from the loop without changing its dimension.

or I want a output from number to boolean converter outside from the loop in 1D.

Hope this will clarify

0 Kudos
Message 11 of 26
(1,223 Views)

And what data do you want in that 1-D array?  Do you want the first value in your numbers? the last? somewhere in between?

 

Each element of your array going in becomes a 1-D array of booleans.  So the entire 1-D array of numbers thus becomes a 2-D array of booleans.

0 Kudos
Message 12 of 26
(1,220 Views)

Actually if I take data of 1D boolean array outside the loop it will become 2D array. Rite? But I dont want that I need to have 1D array of boolean out of the for loop without changing its dimension because I have to pass that sequence to my cDAQ output module.

 

Or I would say I want to pass each iteration value of For loop outside  in 1D array

 

0 Kudos
Message 13 of 26
(1,216 Views)

Plz see the attachment it will clarify my concerns

0 Kudos
Message 14 of 26
(1,207 Views)

Now you are adding more requirements.  What is the DAQ assistant doing?  How many digital channels are you dealing with? What is your DAQ assistant setup?

 

What are your really trying to do here?  When you ask questions that give very little detail, all we can do is try to solve the question put before us.  Then when you start giving out more information piecemeal, then the solution to your simple question isn't so simple anymore.  It may turn out that the answer may need to be completely different, but we wouldn't know that because you haven't told us what you are really trying to do.Smiley Frustrated

0 Kudos
Message 15 of 26
(1,202 Views)

Oh sorry about that.. I am quite new in Labview.

 

What I want to do is I want to pass three different bit sequenece like 100100, 100010, 100110 to the cDAQ NI 9476 one by one so that I can take three different outputs from my (Microlok) PLC machines one by one. Right now I am only sending one bit sequence to cDAQ handing only one output.

 

I have 32 channels but I want all these bits paaing through same lines one after one.

Please ask me if you require more clarification.

0 Kudos
Message 16 of 26
(1,200 Views)

So are you saying you have 32 channels, and you want to send different bit sequences through each of them?  Then your DAQ assistant should be set up for N channels and multiple samples.  Then it would take a 2-D array of booleans.

 

If you have different bit sequences that you want to send through a single digital channel in series one right after the other, then you will want 1 channel multiple samples.  Use Reshape array to convert your 2-D array to a 1-D array and send that to the DAQ assistant.

0 Kudos
Message 17 of 26
(1,196 Views)

oh I am sorry I have 32 lines in one channel and I want to use 6 lines for those 3 six bit sequenecs ie. 100100, 100010, 100110.

For eample 100100 will be the first data for six line which will be replaced by 100010 and then 100110.

 

0 Kudos
Message 18 of 26
(1,191 Views)

You still haven't told how your DAQ assistant is setup.  There is information hidden in there that we can't see from the screenshot of a blue DAQ assistant.

 

(By the way, please attach you images directly as a .png file rather than embedding them in Word documents.)

 

What does the context help say for the broken wire you have in that screenshot?

 

It sounds like you need to be set up for a task with multiple digital lines and N samples at whatever output rate you need.  You may also want to look at the native DAQmx functions.  A DAQmx write can be more explicilty set up for digital output with N lines and multiple samples.

0 Kudos
Message 19 of 26
(1,188 Views)

I am attaching my VI and Sub VI ai am working for. There are some broken wires because I am updating my old VI as I told you my requirement.

 

Please see the SUB VI it may help you to understand. i hope you will able to see DAQ assistance setup inside that.

Please suggest the needful 

 

Thanks

Prashant

Download All
0 Kudos
Message 20 of 26
(1,186 Views)