LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQMx 6229 default D I/O port configuration Problems

Solved!
Go to solution

Hi

 

We are using the PCI 6229 in an industrial PC / Windows 7 CVI application and are interested in setting the power up default configuration for the digital I/O port configuration.

 

We have used the NI Max Device Explorer and config utility to set the defaults for our application configuration 26 DI + 6 DO.

This works fine allowing us to power down the PC and power it back up again and the board retains it's power up configuration.

When we run our application and power cycle the PC, the power up state seems to have returned to factory settings, which is all outputs to 0 (I think).

I do not believe that we are running any functions that perform any hardware resets of the card.

 

Has anybody seen this behavior like this and have any ideas how we can find out how to resolve this issue?

 

Thanks in advance.

Steve Pinfold

 

0 Kudos
Message 1 of 8
(3,502 Views)

Hi Steve,

 

You mentioned that the card does retain its power up configuration when you turn the PC on and off.

 

Am I right in understanding that it only returns to factory settings when your application is run?

 

Does your application trigger the PC to power cycle?

 

Is the application causing the card to return to factory settings? In other words can you run just the application without a power cycle, and see if the card returns to factory settings.

 

Have you tried using the following VI to set the power-up states?

 

http://zone.ni.com/reference/en-XX/help/370469AB-01/lvdaqmx/mxsetpwrupstates/

 

Kind regards,

Josh E
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 8
(3,475 Views)

Hi Josh

 

Thanks for the reply, we have found (as you have quite correctly said) an section in our code that does change the default settings to set to all outputs (it is not my code).

 

One question we do have is that we have now set the port to the default state of all Digital I/O to tri-stated at power up but we would really have liked to set the board to our specific configuration (25 DI + 7 DO) but we found in CVI that the funciton DAQmxSetDigitalPowerUpStates() call to do this returns an error code stating that the required power up config is not supported on the 6229 card. This is a different functionality to the MAX software that does allow us to set this power up configuration.

 

One thing I am guessing is that the Max software may be written in .Net whereas this applicaiton is written in C hence do you think that the library is out of sync with the .Net library ?

 

Thanks

 

Steve

0 Kudos
Message 3 of 8
(3,470 Views)

Hi Steve,

 

Any chance I can get that error code to investigate it?

 

Thanks

Josh E
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 4 of 8
(3,465 Views)

Hi Josh

 

I have attached a RTF with a screen grab of the error dialog.

 

It is error num 200652.


Thanks


Steve
  
  
  
  
  
 
 
 


0 Kudos
Message 5 of 8
(3,458 Views)
Solution
Accepted by topic author StevePinfold

Hi Steve,

 

I've been investigating this issue, and it looks like it is a known bug, and was reported back in October last year.

 

There is a workaround however.

 

You can't set the state of one line at a time, because that will generate a kErrorPowerupStateNotSpecdForEntirePort error. Instead, write multiple DAQmxSetDigitalPowerUpStates() calls with different hardcoded numbers of parameters and switch between them at runtime. I've attached ppus_set.c, which is supposed to randomly switch between setting lines.

 

Hopefully this should be a good starting point for you!

 

Josh E
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 6 of 8
(3,447 Views)

Josh

 

Thanks for the research and also the demo code, we have found a solution by using the tri-state and now we know about this for the future.

 

Consider this case closed.

 

Steve

0 Kudos
Message 7 of 8
(3,443 Views)

Great news, thanks for letting me know!

Josh E
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 8 of 8
(3,439 Views)