From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deciphering the write_dig_line.vi

Solved!
Go to solution

I am trying to decipher the write_dig_line.vi.

First, there is a menu control for all the physical channels. How did this get into the vi? I don't see it anywhere in the functions palette. How did it get populated?

physical channels.png

 

 

Second, this menu control for all the physical channels lets me specify the device, port and line. But in the default configuration, "one channel for all lines", the one-D array of booleans seems to apply to the each of the lines of the chosen port regardless of which line is chosen in the menu control. In this case, shouldn't it just be listing the ports only? I can switch among the lines in the menu control and the outcome is not affected.

list of channels.png

 

Third, when the task is cleared, it has no effect on the digital lines. They remain where they were set last. Shouldn't their voltages revert to where they had been before the task was started?

0 Kudos
Message 1 of 3
(2,581 Views)
Solution
Accepted by topic author mauricev

The control is a DAQmx physical channel that can be found in the IO>DAQmx Name Controls palette.

 

Physical channels can be a single channel or a list of channels. Search the help for physical channel syntax.

 

Clearing a task is just saying that you are freeing the resource up, not actually writing any new data to the device.

Message 2 of 3
(2,551 Views)

Thanks for pointing out where the physical channel control is. I have since learned that right-clicking and choosing I/O Name Filtering, one can set which channels appear. I have also learned that this vi uses typed syntax to specify a port as Dev1/port0/line0:7. The 0:7 specifies all the lines of the port.

0 Kudos
Message 3 of 3
(2,477 Views)