06-15-2012 11:05 AM
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
06-18-2012 09:16 AM
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!
06-18-2012 05:22 PM
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.
06-19-2012 11:01 AM
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.