Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect testing results of PCI-6024E digital I/O in MAX

Solved!
Go to solution

Hello All,

 

I have an issue with PCI-6024E. This is the only NI board installed on a target computer. First it just used Traditional NI-DAQ (7.1, if I am not mistaken) and it worked well. A while ago I installed NI-DAQmx 8.7.1 on the same computer because it is necessary to run both programs written with Traditional NI-DAQ and NI-DAQmx. As far as I know there is no harm in making both NI-DAQ and NI-DAQmx on the same computer if they are not used at the same time. One can see the board PCI-6024E under NI-DAQmx devices and Traditional DAQ devices branches in MAX. When I run Self-test, Self-calibrate or Reset Device in MAX, there is not any problem. But Test Panels (under NI-DAQmx branch) has a rather strange behaviour. When I press the "Start" button on Digital I/O tab in Test Panels window with all digital lines set as input, the first 4 green indicators are being switched on and the other 4 ones are not. And then nothing happens either I press the "Stop" button or not. I have the same board as a virtual one in my MAX on a development computer, and there is a different behaviour of it (I do not have Traditional DAQ there, just DAQmx of the same version). During all the testing procedure until I press the "Stop" button, the state of the 8-line port is permanently changing so the green indicators are being switched on and off with different ways going over all the possible combinations of logical "1" and "0" of each line of the port.

 

The problem is really evident when I try to control the statements of some laboratory devices using their switching via PCI-6024E digital commands. In this case I get automatic powering on the devices connected to the first 4 lines (which are always switched on for some reason, as stated by corresponding green indicators).

 

What should I do? Does it mean the board operates wrong or there is just some conflict of DAQ and DAQ-mx? I would try to reinstall DAQ-mx but I do not think that is a way out of the situation. I work under Windows XP SP2.

 

I appreciate any help.

0 Kudos
Message 1 of 9
(4,488 Views)

Hi IgorE-

 

     When the digital lines are set as 'input', you are reading the state of a digital signal coming into the 6024E.  Do you have digital signals hooked up to every channel on the 6024E or just the first four?  If you disconnect your devices from the 6024E, what behavior do you see in the test panel?  Are they all low?

 

     Your simulated device is functioning as it should.  Because it is simulated, it is simulating a digital input signal signal on each line, and as such, will move through all the possible binary combinations of your 8 digital lines.

 

     I don't think this has anything to so with the presence of both DAQmx and TraditionalDaq on the same computer.  Try disconnecting all signals from the card, then try different combinations of channels and see if you really are seeing the correct behavior.

 

     I hope this helps.  Best of luck with your application!

Gary P.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,454 Views)

Hi GarPar,

 

Thank you for your reply.

 

I'll certainly try to disconnect signals from the card and then connect them in a different way.

 

I have signals assigned to 6 of 8 lines. The first four lines (i.e. 0, 1, 2, 3) are set as digital outputs by corresponding toggles on the digital signals input-output unit (please see the attachment) - these toggles are fixed down. The lines 5 and 6 are used as digital inputs so the toggles 5 and 6 are moved up.

 

Test Panels window in MAX is just a good tool for testing of this PCI board, but not for setting parameters, isn't it? So I've just wanted to check whether the board operates correctly or not. During the testing procedure the digital signals input-output unit was switched off (it has a switch on it for power supply), so fortunately any controlled device connected to used lines couldn't operate and I couldn't receive an information about devices states. In this case, setting all the lines as inputs programmatically I am seeing luminous green indicators for the lines that are actually outputs (defined by the toggles) judging by used lines as described above.

 

The actual problem is when I switch on the digital signals input-output unit, I get automatic powering on the devices connected to the first four lines. That means they all have logical "1" as their states. Despite these lines are set as outputs, I figure they should keep up logical "0" until I change it programmatically. Otherwise, how can I switch devices on and off programmatically and what do I use my own program with clear events sequence for? This happens even I keep closed all the programs on my computer including MAX, just energize the digital signals input-output unit.

 

Perhaps traditional DAQ branch in MAX has any tool to configure digital lines states, not only test them, and it can interfere with the process. I'm not sure of it but it seems to be unlikely.

 

I hope it promotes a better clearing up the problem.

 

Thank you in advance.

0 Kudos
Message 3 of 9
(4,442 Views)

Actually, when I just power up my computer and then switch on the digital signals input-output unit, all devices connected to digital outputs 0-3 (other lines are used as inputs) are also being switched on. I can then switch them off using Test panels window in MAX and setting digital lines 0-3 as outputs there. Since the default states of all lines set as outputs are "Low" in Test panels wndow, my devices are immediately switched off. When I close MAX or restart the computer, those devices are again switched on.

 

I want the situation to be just the opposite. I want all the output lines to make logical "0" until I change it programmatically. Unfortunately, I didn't find any tools in MAX to set default lines states. I suspect the newest version of DAQ-mx has such option, but not for PCI-6024E. Am I right? Is there any *.log or *.ini file keeping the settings of the board?

 

Besides, I'm not sure that's a common situation. In spite of the notes that DAQ and DAQ-mx are compatible with each other, I think I'll only use one of them on the same computer.

 

I'll be happy to see any comments and solutions of this problem.

0 Kudos
Message 4 of 9
(4,415 Views)

IgorE-

 

     Your digital lines are not set to output anything until you start your program or start a test panel.  You can specify high or low before you start your test panel.  Are you saying that your digital lines are 'high' when you plug in your devices even though the lines are specified as inputs?  The defauly power on state of the device is digital input high.  The 6024E has a pull-up resistor network designed to drive the line high by default.  It will be low when a low signal is connected to it.  When you set the digital line as output, you can first specify the output state.

 

     There is no configuration file that allows you to change to output state.  The input is always going to be high when nothing is connected, and the output is always going to be whatever you specify.

Gary P.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 9
(4,397 Views)

IgorE-

 

     What you might be seeing is the digital input line pulling your device high when the 6024E is powered on.  The 6024E has a 10 kOhm pull-up network that pulls the digital inputs up to 5V when nothing is connected to it.  If your device has high impedance (it likely does), then that pull-up resistor network creates a path from 5V high to your device, thus turning your device on upon power-up.

 

     If you want to change this, you can connect a small resistor (<1 kOhm) between your device input and D GND on the device.  This will ensure that any voltage on the input line is bled off to ground.  That way your device should not turn on when you turn on the 6024E.

 

     I hope this helps!

Gary P.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(4,393 Views)

Hi GarPar,

 

Thank you for your interest in my problem.

 

I ought to admit you are right about the default high states of all digital lines regardless of the type of DAQ - traditional DAQ or DAQmx.

 

Now I'm looking for a way to change my program code so that it can set all the necessary lines as outputs with a low level when starts, then control these lines, and finally again set all the outputs as ones with low levels when ends. I'm going to turn on the digital signals input-output unit just after launching the program.

 

In connection with this approach, I have a question. When I clear my digital output task in LabVIEW, all the lines will be again high and accordingly I should first turn off the digital signals input-output unit to avoid switching my devices on again despite the experiment has just been completed? Or it is nothing if I clear my task and then turn off that unit? Will my devices be switched on (high) or they will keep up the correct state (low) until I restart the computer? My program is written using NI-DAQmx 8.7.1.

 

Could you please clear up this obstacle?

0 Kudos
Message 7 of 9
(4,364 Views)
Solution
Accepted by topic author IgorE

IgorE-

 

     Your digital outputs will remain in their last configured state unless the device is reset, in which case they will go to default (high, in this case).  So if the last output state of your program is digital low, as long as you do not call the DAQmx Reset Device.vi or shut down the computer, they will remain low.

 

     If you have further questions about implementing this into LabVIEW, it would be best to create a new forum post so that we can keep these two issues separate (default digital I/O states versus digital programming in LabVIEW).  If you are looking for a starting point, you can open up the Example Finder in LabVIEW (Help»Find Examples).  Once the Example Finder opens, click on Hardware Input and Output»DAQmx»Digital Generation»Write Dig Chan.vi.  This will help you to get started.

 

     Best of luck with your application and have a great day!

Gary P.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 9
(4,333 Views)

GarPar,

 

Thank you so much.

 

Now all about my application is clear enough for me, I'm rather experienced in LabVIEW itself. That's why I'm not going to create a new post.

 

Thank you. The theme can be closed.

0 Kudos
Message 9 of 9
(4,329 Views)