02-16-2012 12:17 PM
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
02-16-2012 12:32 PM
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.
02-16-2012 01:08 PM - edited 02-16-2012 01:15 PM
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
02-16-2012 01:59 PM
Plz see the attachment it will clarify my concerns
02-16-2012 02:42 PM
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.![]()
02-16-2012 02:51 PM
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.
02-16-2012 02:57 PM
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.
02-16-2012 03:17 PM
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.
02-16-2012 03:50 PM
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.
02-16-2012 03:59 PM - edited 02-16-2012 04:02 PM
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