NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


PXI

Reply
Member
DPearce
Posts: 50
0 Kudos

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

Member
KatieC
Posts: 101
0 Kudos

Re: PXI-4110 niDCPower_init

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

Applications Engineer
National Instruments
Member
DPearce
Posts: 50
0 Kudos

Re: PXI-4110 niDCPower_init

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.

Member
DPearce
Posts: 50
0 Kudos

Re: PXI-4110 niDCPower_init

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.

 

Member
KatieC
Posts: 101
0 Kudos

Re: PXI-4110 niDCPower_init

DPearce, 

 

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

 

Hope that helps!

 

Katie

Applications Engineer
National Instruments
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page