Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQPad-6508 using VB.Net

I'm kind of new to this stuff, hopefully I am clear.

I'm using the DAQPad-6508 hardware trying to set all 96 outputs high. Using the MAX program, I set up 12 virtual channels as "write to port", labeling them "Port APA", "Port APB", and so on. I am using VB.Net. In the VB.Net program, I am using the CWDIO Control in the Measurement Studio Toolbox (the device is set to DAQPad-6508, all ports are left as unused because they were configured in MAX). In the program, I have the following code:
AxCWDIO1.ChannelString = "Port APA"
AxCWDIO1.SingleWrite(255)

When this part of the code is ran, all 8 bits go high as expected. Stepping through the code, the very next lines are:
AxCWDIO1.ChannelString = "Port APB"
AxCWDIO1.SingleWrite(255)

When this part of the code is ran, these 8 bits go high, but the bits in port APA all go low instead of staying high. This behavior continues for the next port, APC. Now, if I were to set port BPA high while APA is high, APA stays high & BPA goes high as expected. For some reason, when xPA goes high, (x being A, B, C, or D) any of the remaining xPy (y being A, B, or C) that are set overrides the previous setting. This holds true for all combinations i.e. starting with APB, then trying to set APC or APA.

Are there some known issues with running Traditional NI-DAQ Devices with VB.Net instead of NI-DAQmx Devices?

By the way, there is working code to do this in VB6, I'm trying to do it in VB.Net. Do I have to use the VB6 conversion because of the device being a Traditional one?

Any and all advice is appreciated.
0 Kudos
Message 1 of 2
(3,305 Views)
Hi funkyfingersdre,

The behaviour you're observing is not due to the usage of VB.Net and the Traditional DAQ driver, but the structure of the 6508. To write to multiple ports (controlled by the same chip), you should configure all the ports before writing. The KnowledgeBase articles below will provide more information:

Controlling the ports of PCI DIO-96/PXI 6508 individually

Why Do All My Digital I/O Ports Reset When I Configure One Port?

Thanks,
Lesley
0 Kudos
Message 2 of 2
(3,297 Views)