Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

What happens to DIO channels that are not assigned?

Would like to know what happens when I write to a static DIO channel that was not assigned.  I have an application for which I only want to activate a few channels, but for simplicity, it will be much easier if I write the same value to all channels.  For example, if I only assign channel DIO14 as a static write channel, but still send 0xFFFF for the write data, will the unassigned channels (0-13, 15) still be pulled high?  I suspect that they will remain low, but want a little more confidence before I try on hardware.  Please advise.  Working with PXI-6541.  Thanks.

 

GSinMN   

0 Kudos
Message 1 of 5
(5,113 Views)

If you only want a single channel to change, why are you writing to a port?  Just write a single boolean value to that line.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(5,111 Views)

The single channel example was for discussion purposes only.  In practice, my application will require several (but not all) channels to be written to at the same time.  I will also need to generate waveforms on some channels (dynamic channels).  The reason I am concerned about unassigned channels is because our testing hardware has all channels hard-wired (we use the same test equipment for many applications).

 

GSinMN    

0 Kudos
Message 3 of 5
(5,109 Views)

How are your tasks set up?  That's what determines what will be written.  If your task is for the entire port, then you will be writing to your entire port.

 

A trick I have done is read the port (assuming you have another port available for readback), AND the result with some mask (0 for the values you want to write to, 1 for those you don't want to change), and the OR that result with your value to write.

 

But let's see some code so that we are all have the same reference.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(5,104 Views)

The code thus far is just a TestStand Sequence, calling the basic HSDIO functions from Labview (Initialize Generation, Assign Channels, Write Static, etc.).  I have some situations where I have created custom code modules, but for this section, I only call the basic functions directly. 

 

The tasks are organized in a spreadsheet.  I import the data into arrays for each section of the test procedure.  I then loop through the array to run each individual test step.  In general, each loop contains a step to write DIO, and a step to read DIO.  The channel assingments are currently taken care of outside the loop, but I suspect it may be easier to reasign the channels every time (inside the loop) and write to all channels, then it will be to inject only the needed channels into a 32 bit word (write data) every time I want to set them.  Of course, if it comes to that, I will ask this question in the TestStand forum.  First I wanted to check to see if my strategy is legit here in the DIO forum.

 

GSinMN        

0 Kudos
Message 5 of 5
(5,099 Views)