05-13-2020 07:01 PM
I have an array of booleans the length is 30. I want to write each of these booleans to the same port0/line0 of an Digital I/O module as shown below:
Basically I want to write to port0/line0 one bool at a time so that at the port0/line0 i get a graph like:
But I'm not able to find an option for the DAQmx Write vi where you can select this option. As shown below. Is that possible?
Solved! Go to Solution.
05-13-2020 10:59 PM
You are connecting and indicator to an input of the DAQmx subVI. You have two data sinks and no data source. Thus a broken wire.
Change the indicator into a control or constant.
05-14-2020 08:22 AM
Looks like the rest of the diagram was not copied. This is what I have
and when I change the write vi to
The broken wire is fixed but then an error shows up about lines in channel and lines in data.
05-14-2020 03:05 PM
Read what the error message says.
Somewhere you have a quantity mismatch.
Since we still can't see all of your code, we don't know how many lines you configured in your task.
Or how many boolean elements are in that 1D boolean array.
If you've read any messages on the forum before, I'm sure you've read many of us write that it is impossible to debug screenshots, particularly partial images of screenshots. You need to attach an actual VI.
05-14-2020 03:52 PM
Hi RavensFan,
Got the issue resolved. I converted the boolean array into a waveform which I'm feeding directly to the DAQmx Write Vi. Looks like I'm not getting any more errors. The only question now is will this write the same waveform continuously to the output (since I'm selecting the Continuous Samples) if yes does it stop once it exits or when does it stop?
05-15-2020 01:23 AM
Hi R,
@RFeng wrote:
The only question now is will this write the same waveform continuously to the output (since I'm selecting the Continuous Samples) if yes does it stop once it exits or when does it stop?
"It" stops outputting data on this DO pin when the DAQmx task is stopped (or an error occurs)…