PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-4110 niDCPower_init

I am just starting to write a program for my PXI-4110 Programmable DC Power Supply.

 

I am using the function niDCPower_init(). When I read the documentation about this function it made this statement:

"This function is deprecated. Use niDCPower_InitializeWithChannels instead."

 

My fp file (nidcpower.fp) does not have this function. Do I need a newer fp file? Is this function niDCPower_init() only a poor choice or is there something wrong with it?

Deprecated was an odd word to use to describe this function. It implies that the function is disapproved of but maybe it works. What is the opinion of others?

 

I am going to try it out but would like to know if this is the function I want to use.

 

thanks in advance

0 Kudos
Message 1 of 5
(4,406 Views)

DPearce,

 

Thank you for using NI forums! Deprecated functions use the deprecated programming model

 

In terms of the niDCPower_init function, it is obsolete. If you do not have niDCPower_InitializeWithChannels, I would recommend downloading the most current version of our driver. You can download the driver here. You can find more information on this function here. The VI version is here (I tend to find the VI version a little more reader friendly!). 

 

Also, I would check out the shipping examples that come with this driver. That will help you see the various functions in action and assist you in determining which one you want to use. 

 

Let me know if you have any other questions!

 

Katie

Katie Collette
National Instruments
0 Kudos
Message 2 of 5
(4,399 Views)

I downloaded V1.6.3 and installed it. Had some trouble but have it installed and working now. Did not see any example code with the drivers.

 

Have a question about successful function call status = niDCPower_InitializeWithChannels().

What does status equal when the function call is successful? It does not say in the documentation. I would imagine it is successful when it returns a zero.

0 Kudos
Message 3 of 5
(4,395 Views)

I found some examples on my computer so I am good there. I am still curious if a 0 return value means there are no errors. I would bet that is true but find it funny the documentation would not say that; on other NI documents about function status it always tells you when value of status means all is well.

 

0 Kudos
Message 4 of 5
(4,388 Views)

DPearce, 

 

1 or true means there is an error; 0 or false means there is no error. 

 

Hope that helps!

 

Katie

Katie Collette
National Instruments
0 Kudos
Message 5 of 5
(4,383 Views)