VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the Physical Addresses of Digital IOs

Hello,

 

when I try to  deploy my programmatically created system definition I get the following error:

 

Error -200220 occurred at Project Window.lvlib:Project Window.vi >> Project Window.lvlib:Command Loop.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi

Possible reason(s):

Device identifier is invalid.
=========================
NI VeriStand: NIVS_DAQ Measurement Types Plugins.lvlib:DAQmx Create Channel (DO-Digital Output).vi:1<append>
Device Specified: Digital Output
Suggested Device(s): PXI1Slot2, PXI1Slot8, PXI1Slot5, PXI1Slot10

Task Name: PXI1Slot2_DO

 

I assume the problem is caused by an incorrect physical address of my DAQ digital inputs and outputs. When I add digital IOs using the System Explorer, the physical address starts with the name of the respective DAQ card:

PXI1Slot2/port0/line0

 

However, when programmatically creating the system definition, the physical address starts with either "Digital Output" or "Digital Input":

Digital Output/port0/line0

 

How can I change the physical address using the .NET API? I haven't found anything in the docs. My VS version is 2012.

 

Thanks & Regards

Krid

 

0 Kudos
Message 1 of 4
(4,566 Views)
Can you share your code? When you construct the daq object, it's name should be the device name
Stephen B
0 Kudos
Message 2 of 4
(4,553 Views)

Hi Stephen,

 

I create DAQDevice Objects like this:

#                             Name      Description                    InputConfiguration  AI  AO  DI  DO PortWidth
DAQDevices = ((DAQDevice('PXI1Slot2',  "Description", DAQDeviceInputConfiguration.Default,  0, 32,  0,  8,        8), 'PXI-6723',  True, False),
              (DAQDevice('PXI1Slot5',  "Description", DAQDeviceInputConfiguration.Default, 32,  4,  0, 32,       32), 'PXIe-6363', False, False),
              (DAQDevice('PXI1Slot8',  "Description", DAQDeviceInputConfiguration.Default,  0,  0, 24, 24,        8), 'PXI-6528',  True, True),
              (DAQDevice('PXI1Slot10', "Description", DAQDeviceInputConfiguration.Default, 32,  4,  0, 34,       32), 'PXIe-6363', False, False))

 Later I add the devices to the system definition:

 

chassis = target.GetHardware().GetChassisList()[0]
for DAQ in DAQDevices:
    DAQDev = DAQ[0]

    ...

    DAQDev.ProductName = DAQ[1]
    chassis.GetDAQ().AddDevice(DAQDev)

 

Of course there is a lot of other code that I left out, but I guess only the Table above is really important.

 

Thanks

Krid

 

0 Kudos
Message 3 of 4
(4,537 Views)

I see this is a bug and I filed it to R&D as CAR 514005

 

The issue is inside the DAQDevice constructor. To work around this, construct the device with 0 DIO and then add them in yourself with additional invoke nodes on the DAQDevice object.

  1. Call DAQDevice.CreateDigitalInputs method to make the section
  2. Construct DAQDIOPort(s)
  3. Construct DAQDigitalInput(s)
  4. Call DAQDIOPort.AddDigitalInput to add your inputs to the port
  5. Call DAQDigitalInputs.AddDIOPort to add the port to the digital inputs section

 

Sorry for the inconvenience

Stephen B
Message 4 of 4
(4,526 Views)