LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

initializing/configuring DAQ output port

Attached I have a simple program that I am using to make sure I understand how to interact with the PCI-6025E (Device 1). It works just fine with the test panel, and it works fine after I do some configuration with the test panel. However if I get out of labview and reload this simple program it no longer works till I go into the test panel an configure and actually write to the port. After that, my program will work again. Right after loading labview however, if I try to run this program, it gives me the following error message:

Error 10008- occurred at DIO Port Write.
Possible Reasons:
NI-DAQ LV: The group is invalid.

I am trying to find the right configuration VI to make this work but I guess I don't un
derstand the concept of groups vis-à-vis port, lines, and channels. The "Write to Digital Line.vi" does not even mention a group.

Any idea what I need to do to keep from needing to manually use test panel again every time I reload this vi?
Thanks,
0 Kudos
Message 1 of 5
(3,476 Views)
If you look inside Write to Digital Line.vi, you'll see that it calls DIO Port Config.vi. So what's happening is that you're configuring the dio 8 times after the initial one and because you don't have any dataflow, the order of initialization is random. All you have to do is call DIO Port Config once at the beginning and then do a DIO Port Write to set the values of the individual lines. Make sure you connect the task id out of DIO Port Config to task id in of DIO Port Write.
0 Kudos
Message 2 of 5
(3,476 Views)
Dennis -- Thankyou for taking the time to answer me. Your answer didn't help me solve the problem using the "Write to digital line" and the "Write to digital port" functions (vi's) that I had been using, but, rather, led me over to the "DIO Port Config" and "DIO Port Write" functions which solved the problem. The "write to digital port" function would have been handy because of the iteration line which can be tied to the looping index to automatically take care of the first time initialization. The "DIO Port ..." vi's don't have this feature. If there were a way to do it with the other functions, I would be interested to learn how. When using the configuration line on those vi's I seem to be able to write to only one port at a time. The writes to the ot
her port get ignored or even erase the prior writes to that port.
Thanks again.
-Tonboy
0 Kudos
Message 3 of 5
(3,476 Views)
Here's a simple example that I use when I want to write to all three ports and all lines. Hope it helps. It's in LabVIEW 6.1. If that's a problem, let me know.
0 Kudos
Message 4 of 5
(3,476 Views)
Thankyou again, Dennis, for the example. It confirms what I had already concluded from your original answer so that is good reinforcement. I appreciate your help. Have a great day!
-Tonboy
0 Kudos
Message 5 of 5
(3,476 Views)