Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

how to initialize other DO channels beside channel 0?

Hello
 
Question as in subject - I can initialize and set channel 0 on 6115 with this procedure:
 
    i16 iStatus = 0;
    i16 iRetVal = 0;
    i16 iDevice = 1;
    i16 iPort = 0;
    i16 iMode = 0;
    i16 iDir = 1;
    i32 iPattern = 1;
    i16 iIgnoreWarning = 0;
    i16 iYieldON = 1;
    iStatus = DIG_Prt_Config(iDevice, iPort, iMode, iDir);
    iRetVal = NIDAQErrorHandler(iStatus, "DIG_Prt_Config", iIgnoreWarning);
    iStatus = DIG_Out_Prt(iDevice, iPort, iPattern);
    iRetVal = NIDAQErrorHandler(iStatus, "DIG_Out_Prt", iIgnoreWarning);
 
But if I set iPort to any other number i get -10007 error. For channel 0 it works great but for others not at all...
 
Thanks in advance for any replies..
0 Kudos
Message 1 of 4
(3,341 Views)

Hi,

The PCI-6115 has one port: port 0.  This is why you can initialize port 0, but receive an error when you try to initialize any other ports. 

Regards,

Hal L.

0 Kudos
Message 2 of 4
(3,312 Views)

Thet's interesting because in features i can see:

Key Features:

·10 MS/s simultaneous sampling multifunction DAQ

·Four 12-bit, pseudo differential analog inputs; 16 or 32 million sample onboard buffer

·Available analog input signal range from +/-200 mV to +/-42 V

·Calibration certificate provided for NIST-traceability

·Two 12-bit analog outputs; 8 digital I/O; two 24-bit counter/timers; analog and digital triggering

 

So I don't fully understand what do you mean by pci-6115 has one digital port, i thought it has 8....

Thnx for reply though

0 Kudos
Message 3 of 4
(3,311 Views)
Hi,
A port is a group of digital lines. The PCI-6115 has one digital port, which consists of 8 indiviual digital I/O lines. When you initialize the port, you are initializing all of the individual lines on that port. When you write to that port, you are writing to all of the individual lines on that port. 
 
 
 
Regards,
Hal L.
 
 
0 Kudos
Message 4 of 4
(3,298 Views)