Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-2586 stops working in a Real-Time Startup

I have a Real-Time application that must receive a command via TCP/IP and Open/Close switches on the PXI-2586 based on these commands.  I use data binding to shared variables on a GUI to view the results.  This setup runs perfectly when I run it manually from the project folder, but when it is built and run as a startup (automatically runs when chassis boots up) the switches stop working.  I am still able to communicate properly with a DAQ Card (PXI-6229), an I/O Card (PXI-6514), and a Power Supply in this same application when it is running as a startup.  It is only the switch card that stops responding.  I have received the following error from the switch functions when the startup is running:  niSwitch Initialize with Topology.vi<ERR> Failure Loading driver module  The driver for the DAQmx switch is not loaded.
 
Other info:
1.  I am using an 8196RT controller and I am using a LabVIEW 8.5 development system for programming.
2.  I have tried deleting and reinstalling the switch drivers; no change in error.
3.  I have tried running the same application on another identical system and the problem is duplicated.
 
I am at a loss regarding what I should try next.  Any advice or help is appreciated.
0 Kudos
Message 1 of 10
(9,772 Views)

Hi Aimi,

We'll attempt to reproduce the issue here. 

Can you provide me the software you have installed on the 8196RT?
Will you attempt using a DAQmx Device Reset VI with the PXI-2586 as a test to see if that also fails?

Thanks for letting us know about the issue.  Best regards,

Chad Erickson
Switch Product Support Engineer
NI - USA

0 Kudos
Message 2 of 10
(9,768 Views)

Hi Chad,

I'm sorry I did not reply to your post sooner.  I have been running a few more troubleshooting cases and trying to figure out a way to send you the part of my code that is having this problem.  Unfortunately, I am unable to simply provide the software that is installed on the 8196RT because this is a sensitve system (files cannot be copied) and it is a stand-alone system (there is no connection to the internet).  I will keep trying to get a code sample posted, but in the mean time I want to provide more detailed information so you can try out a similar case on your own.

To answer your question, the DAQmx Device Reset VI does not fail when I use it in a Real-Time startup.  I have been able to narrow the problem down a bit more, and maybe I can provide enough information for you to reproduce the error.  It seems that "Initialize with Topology.vi" is receiving a valid input, but in Real-Time (running as a startup) it is providing an output that looks like an empty string.  Conversely, when it is run manually, it creates a valid handle.

I have reproduced the error using a simple VI: 

1.  I have a while loop with a case structure inside the loop.  There is a 100 ms delay in the while loop (using the Wait (ms) function).  The Stop terminal of the while loop is wired to run as an infinite loop.  The Initialize With Topology VI is outside the loop, wired to the loop using a tunnel, and wired to the case structure inside the loop using a tunnel as well.

2. The case structure inside the loop has eight different cases.  A Shared Variable (string type, let's call it COMMAND) is wired to the case selector of the case structure.  Each case either opens or closes a specified relay using niSwitch Relay Control.vi followed by niSwitch Wait for Debounce.vi.  The following list provides the cases, the switch identifier used in each case, and the switch command (or state) being set in each case: 

    • CASE 2828, k9, Open Relay
    • CASE 2929, k9, Close Relay
    • CASE 3636, k6, Open Relay
    • CASE 3737, k6, Close Relay
    • CASE 2C2C, k5, Open Relay
    • CASE 2D2D, k5, Close Relay
    • CASE 2E2E, k7, Open Relay
    • CASE 2F2F, k7, Close Relay

When the COMMAND Shared Variable has 2D2D written to it, for example, it should open the relay on the card that corresponds to k5.  All error outputs are also wired to a shared variable of the proper type.

3.  The shared variables used in this VI are accessed by creating another VI on a PC.  This VI has a text control (bound to COMMAND), an OK control button, a Stop control button, and multiple error indicators (bound to the error shared variables created in the first VI) on the front panel.  A delay of 500-1000 ms provides a good update rate in this loop.

4.  This user VI has a while loop with the Stop terminal wired to the Stop control on the front panel.  A case structure is placed inside the while loop, and the OK control from the front panel is wired to the case selector of this structure.  In the true case, the value entered in the text control will be written to the COMMAND Shared Variable.  In the false case, do nothing.  All other front panel terminals are placed inside the loop so it will update the values each loop iteration.

When both of these VIs are run manually, the switches respond to the commands as expected.  When the first VI is built and run as a startup, the switches don't respond anymore, even though the shared variable COMMAND is read properly and the proper case is selected.

Thanks so much for your help,

Aimi

0 Kudos
Message 3 of 10
(9,747 Views)

Hi Aimi,

Thank you for the excellent detail.  We will continue to try and reproduce the problem.  Can you provide me the National Instruments LabVIEW RT (I'm assuming LabVIEW RT 8.5) and driver versions you have on the 8196 RT?  You can do this by taking a screenshot or providing a list of what is displayed in Measurement and Automation Explorer under Remote Systems >> [Your RT Controller] >> Software.

You mention that the DAQmx Device Reset VI does not fail.  For now, as a workaround, can you use DAQmx Switch VIs instead of the niSwitch VIs to perform the switching functionality?  Please let me know how this goes.

Thanks and best regards,

Chad Erickson
Switch Product Support Engineer
NI - USA 

 

0 Kudos
Message 4 of 10
(9,743 Views)
Hello Chad,
 
I am an FSE in China. We encountered similar problem today.
 
In our setup, we have PXI-1042 + PXI-8196RT + PXI-2569  + PXI-6514 (and other DAQmx devices) + LV 8.5.1 + RT 8.5.1 + latest Device Driver. We found that using LV project all program are working fine but when we built it as a startup RT exe,  all DAQmx devices works except PXI-2569.
 
We did test with NI-Switch VIs as well as DAQmx VIs, neither could work in a startup exe. Please find attached test program and some screenshots for reference. It seems the driver VI can't correctly config the switch board.
 
Our AE also helped us do the test with PXI-8106 + PXI-1045 + PXI-2569 and PXI-2564 but he didn't see the same problem. Is it related with dual-core processor optimization?
 
Thank you!
 
Cenwei
Regards,

Cenwei Liu || DSM of West China
0 Kudos
Message 5 of 10
(9,524 Views)
Hi Cenwei,
 
I believe the issue stems from attempting to call into the driver before it is loaded.  Previously, we've noted the issue to be controller-specific.  Have you performed the following workarounds?
  • Implement a medium to long delay at the beginning of the startup RT application
  • Verify the customer has tried using DAQmx Switch VIs

If the customer is seeing this issue when using DAQmx Switch VIs, it would be the first time DAQmx Switch VIs are linked to the issue.  I would make sure this is the case.

Hope this helps!

Chad Erickson
Switch Product Support Engineer
NI - USA

0 Kudos
Message 6 of 10
(9,517 Views)
Hi Chad,
I am Deng, from NI Shanghai. I've visited the customer with Cenwei today.
We tried use DAQmx Switch VIs and NI-Switch VIs respectively to build a simple connection program. Both program works fine under development environment, that is to say, manually run the program. But we can't make the Switch Card work if we build the program as a startup exe. And we're sure the build specification property is set right. What's the difference between development environment and startup applications?
Thanks!
 
Deng  NI Shanghai
0 Kudos
Message 7 of 10
(9,509 Views)

Hi Deng,

I believe the error results from the fact that the device loader service hasn't yet started with the startup application.  In the development environment, the device loader service has started and finished by the time you are calling into the driver.

Adding the delay in the customer's VI should be sufficient to overcome the problem.  Remember, we need the device loader service to at least get started by the OS before the switch driver is called.

CAR# 107265 has been filed for this issue.  

Once again, I think a delay just needs to be added before the customer tries to call the switch driver.  Since this is RT, it should be pretty deterministic in the amount of time it takes to load the driver.

Best regards,

Chad Erickson
Switch Product Support Engineer
NI - USA

0 Kudos
Message 8 of 10
(9,477 Views)
Hello Chad,
 
Thank you very much for the reply!
 
We will try this work around ASAP and will keep you tuned about our progress.
 
Cenwei
Regards,

Cenwei Liu || DSM of West China
0 Kudos
Message 9 of 10
(9,474 Views)
Hello Chad,
 
Today I verified adding a delay at the beginning of the program will solve the problem. Thanks for helping!
 
Cenwei
Regards,

Cenwei Liu || DSM of West China
0 Kudos
Message 10 of 10
(9,455 Views)