LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

niDCPower Initialize option string

In the manual page of the niCDPower initialize with independent channels (https://www.ni.com/docs/en-US/bundle/ni-dcpower-labview-api-ref/page/instr-lib/nidcpower/nidcpower-l...)

there is a mention to the input: "option string", but no link or explanation on the options itself. Anyone knows where is the list of options (and their explanations) for this case?

Thanks in advance.

0 Kudos
Message 1 of 6
(544 Views)
  •  

    Try looking into the "NI DC Power Supplies and SMUs Help"

     

     option string 

    option string specifies the initial value of certain properties for the session.

    The syntax for option string is a list of properties with an assigned value where 1 is TRUE and 0 is FALSE. For example:

    Simulate=0, DriverSetup=Model:<model number>; BoardType:<bus connector>

    To simulate a multi-instrument session, set Simulate to 1 and list multiple instruments for DriverSetup. For example:

    Simulate=1, DriverSetup=ResourceName:<instrument name>; Model:<model number>; BoardType:<bus connector> & ResourceName:<resource name>; Model:<model number>; BoardType:<bus connector>

    You do not have to specify a value for all the properties. If you do not specify a value for a property, the default value is used.

    For more information about simulating a device, refer to Simulating an Instrument in the NI DC Power Supplies and SMUs Help.

0 Kudos
Message 2 of 6
(520 Views)

You are just quoting the help file I linked before, I already read that, is why I linked in first place.

It just seems like an example on how to set the options, not the list of all possible options and their meanings, which is what I'm looking for.

0 Kudos
Message 3 of 6
(515 Views)

I am not an expert, however I have spent way too much time learning to use Python to control LabVIEW (more correctly--NI Module instruments)

Here is an option string: 

options = { 'driver_setup': {'Model': '4132', 'BoardType': 'PXI' } }

This is also an option string: ("")

The main purpose of the longer one is to set up a simulation

This code works for me*:

import pyvisa
import nidcpower
import nidmm
import time

NI4071 = nidmm.Session("NI4071")
NI4071.configure_measurement_digits(nidmm.Function.DC_CURRENT, 0.1, 6.5)
NI4071.adc_calibration #from github file TEST [.on] ???

#option_string = { 'driver_setup': {'Model': '4132', 'BoardType': 'PXI' } }
#NI4132 = nidcpower.Session("NI4132", channels=0, reset=False, options=option_string)
NI4132 = nidcpower.Session("NI4132",channels=None, reset=True, options= "")
NI4132.self_cal()

*The # lines don't help. In fact, to get this far, I had to tweak some of the NIDCPower code to keep deprecated functions from throwing errors. "Deprecated" == instr.lib has no vi to match the API calls in the {hidden code}. Best place to start is to set independent_channels to False. Maybe in the code. If there is anyone else doing API debugging, I can tell more . . .

NOTE: probably because I am trying to use obsolete (eBay cheap) gear with LV18 and python.

 

 

0 Kudos
Message 4 of 6
(372 Views)

jano2358@gmail.com wrote:

You are just quoting the help file I linked before, I already read that, is why I linked in first place.

It just seems like an example on how to set the options, not the list of all possible options and their meanings, which is what I'm looking for.


NI R&D seems to use the options string, like a backdoor, to access the driver's secret features. Hence, only a few option strings are published, and a complete list is not publicly documented.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 5 of 6
(368 Views)

From session.py {part of the NIDCPower script}

" independent_channels (bool): Specifies whether to initialize the session with
independent channels. Set this argument to False on legacy applications or if you
are unable to upgrade your NI-DCPower driver runtime to 20.6 or higher."

 

Go into session.py and change the default fot "independent_channels" to False.This is the key to using PXIe-4130 and 4132 with LV18 on a WES7 SP1 PC. NI SMU's are excellent and I'm sure in a Lab or high-tech operation there would be ample justification for buying new from NI. Me; I restore and reuse older NI modules from eBay.

0 Kudos
Message 6 of 6
(357 Views)