The Option String
In general, the initialization string is an optional list of name-value pairs where the name is the exact string name of of a read/write property of the resource type you are trying to open and the value is a valid value for that property. This allows the option string to set up the properties of a session polymorphically.
Here is an example string from an RS-232 (ASRL) resource:
Timeout = 2000 ; SendEndEnabled = TRUE ; TerminationCharacter = 10 ; TerminationCharacterEnabled = FALSE ; BaudRate = 9600 ; DataBits = 8 ; EndIn = ASRL_END_TERMCHAR ; EndOut = ASRL_END_NONE ; FlowControl = ASRL_FLOW_NONE ; Parity = ASRL_PAR_NONE ; RequestToSendState = 1 ; DataTerminalReadyState = 0 ; StopBits = ASRL_STOP_ONE ; MaximumQueueLength = 1000 ; ReplacementCharacter = 255 ; XONCharacter = 17 ; XOFFCharacter = 19
You may find that the easiest way to get the option string you wish to use in the future is to first create a VISA COM I/O session with a blank option string parameter (meaning the session will be created with the vendor-specific default values.) Then set the properties on the VISA COM I/O session to the values you desire, and save the value of the OptionString property of the IVisaSession interface to a file to use in future Open calls.
The string must conform to the following grammar:
|
The initvalue type has the following restrictions:
Property Value Type | Valid Values |
---|---|
Numeric |
Either
|
String |
The string enclosed in quotation marks |
Boolean |
Either
|