Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Confusd with the function of the I/O switch on NI USB-6509

 Hi

 

I recently bought the NI USB-6509 DIO device but i'm abit confused with function of the I/O swicth, i've been playing around with it to get my VI to work but they exist ports conflicts. Below aremy stupid doubts as i've read through the user guide but i'm still not clear.

 

 

1) Is the I/O switch use to configure the port lines. (As inputs (acquire) or as outputs (generate))? or

 

2) Is the I/O switch use to send or write digital values (1 or/and 0) to the configured port lines?  or

 

3) Is the I/O switch use to configure the power up states of the device?

 

 

This is what i've done.

 

I use MAX to configure ports 0 to 5  as outputs and ports 6 to 11 as inputs.

Switch to LabVIEW, select the configured output and input ports in my VI. Phyiscally connects the output to input with jumpers.

Run a VI that writes 32 bits data of 1s and 0s to the output ports. I was hoping to see the same data result (or altleast inverted or reversed) in the input configured ports but there was nothing. I flip the I/O switch around and i received port conflict errors,such as ports reserve etc.

 

I don't really know what i'm doing wrong and what positions must the I/O switch be set to; because in either positions the 12 ports lines are either all 0 or 1. I don't wanna use the swicth to configure or write data to the ports, i wanna do so but using the VI that created.

 

Thanks for assisting.

 

rgds

 

Paul

0 Kudos
Message 1 of 7
(3,897 Views)

The purpose of the switch is defined in the manual.

 

I have not used the USB-6509, just the PCI-6509 which does not have a switch but I don't see how the switch setting could cause any errors in DAQmx.

0 Kudos
Message 2 of 7
(3,893 Views)

I have the manual and because the code worked on the simulated device without errors, that is why i'm asking what could be the problem.

 

Rgds

0 Kudos
Message 3 of 7
(3,879 Views)

The switch controls the pull up or pull down resistors in the card.  It should have no effect on the output (high or low).  If you are connecting the input lines with the output lines on the same card, one should be pulled high, and the other low (because you always need to connect a sinking input/output to a sourcing one).

 

-Christina 

0 Kudos
Message 4 of 7
(3,860 Views)

Hi Christina, 

 

I appreciate your reply but i think you've just beat by the bush, my above questions weren't answered properly because i'm now more confused and if i may asked what does the pull up or pull down resistors in the card controls. (i.e. by setting the switch I/O as high or  low, do they control all the lines to a particular power up states or configured all the channels as either inputs or outputs or writes data (1 or 0) to all the port lines)

 

You talked of pulling all the configured outputs/inputs lines either high or low. In my case (as  i've explaned above) what lines must i pulled high (is it output lines or input lines) and what lines must i pulled low (it is output lines or input lines).

 

And if that is the case what is the use of using MAX to configured some of the lines as outputs and some inputs, i thought by using MAX to configured the port lines you automatically overwrites the switch settings, thus you don't need pull up or pull down resistors to configured some ports as outputs and some inputs.

 

Please i'll appreciate if your reply addresses my questions they way i asked them to avoid being funny or boring you with the same questions (going round and round in  a circle).

 

I really appreciate all your response to all my questions regarding state machines in LabVIEW and NI USB-6509.

This is one of my master thesis project i've to submit in November that is why i pressing a bit harder for direct solutions than trying to figure it out myself.

 

Rgds

 

Paul

0 Kudos
Message 5 of 7
(3,846 Views)

If the line is not connected and it's set for an output, a pull-up will force the output high. A pull-down will force the output low. The switch has nothing at all to do with setting the lines as inputs or outputs. If they did, the manual would state that. The switch physically places resistors to gnd or +5 as shown on page 15 and you do not override this with anything you can do in MAX.

0 Kudos
Message 6 of 7
(3,841 Views)

Hi Guys, how is there going  today, don't be angry ii's not  a problem but a solution.

 

I got it to work at last by playing with it and i'll like to share my experience and finding so that somebody in future shouldn't go to bed at 3 a.m trying to figure out the same issues.

 

Tips.

 

1) It optinal to pull the configured outputs/inputs lines to gnd or Vcc with resistors; the switch setting must be set to low otherwise (if high) there inputs will always be high and by reading a high logic from your VI, it will be inverted.

2) All the port settings (logic states) in MAX, power up states, test panels, input/output channels, in the VI must correlate.

3) Do not run the VI while you are busy runnning the test panels or the  inputs and output tasks created in MAX.

4) Check not to write and read ffrrom the same port or lines esp if u haven't got an error checking routine.

 

Recomendation:

I think NI should revise the NI USB-6509 device swicth logic states of being high or low, because it's not specfied if it's the logic state of the power off states, of the input/output task or data to be written to the ports.

 

 

Anyway although u guys never gave me a proper solution to my question,  you guys guided me to the solutions and once more i appreciate all the supports to my project, NI forum rocks, atleats it is alive and working with immediate response.

 

Take care and bye for now.

 

Rgds

 

Paul

 

 

 

0 Kudos
Message 7 of 7
(3,827 Views)