To begin, you need to have the correct driver and APIs installed. To do this:
1. Download the NI-DCPower driver and the NI-DCPower .NET Class Libraries. This compatibility char
t lists the driver and API that correspond with each other with links to download them (note that NI DC-Power 17.0 is also compatible with .NET API 14.1 although not listed).
2. Create a driver session and logical name in NI MAX that points to the instrument driver software module for the correct version of .NET you are using. The logical name needs to point to the driver session you just crated in the drop-down menu.
To create the driver session and logical name:
1. Right click the driver session drop down and choose “Create New”
2. Select the Software tab and choose the Software Module for the version of .NET
3. Navigate to the hardware tab at the bottom of the screen and add the hardware resources you are going to use.
4. Save the driver session (top left >> Save IVI Configuration).
5. Create a new Logical Name (right click Logical Name drop down >> create new) C
6. Configure it to point to the driver session you just created. It should populate in the drop-down menu.
7. Click Save IVI Configuration
At this point, you should be able to compile your C# code using the logical name specified in the above steps to successfully initiate a driver session.