pipx40_setChannelPattern
Function |
pipx40_setChannelPattern (ByVal vi As Long, ByVal subUnit As Long, ByRef pattern As Long) As Long | |
ViStatus |
pipx40_setChannelPattern (ViSession vi, ViUInt32 subUnit, ViAUInt32 pattern); |
Parameter |
I/O |
Description |
vi |
in |
Instrument handle |
subUnit |
in |
Numeric variable indicating in which sub-unit actions will take place |
pattern |
out |
pointer/reference to the one-dimensional array (vector) containing the bit-pattern to be written |
Return Value
0 = Successful operation. Negative values are error codes and positive values are warnings. To get a description of the error, pass the error code to pipx40_error_message.
Description
Sets all output channels of a sub-unit to the supplied bit-pattern.
Remarks
The number of least significant bits corresponding to the size of the sub-unit are written.
For a Matrix sub-unit, the data is folded into the vector on its row-axis. See Data formats.
In some high-density matrix cards the number of simultaneous crosspoint closures that can be made is restricted in order to prevent overheating. If the number of channel closures specified would exceed this limit an error is reported. The maximum number of channel closures permitted can be obtained using pipx40_getClosureLimit. Limit values are such that they should not impact on normal matrix operations. Although it is possible to override the closure limit using pipx40_setDriverMode this is not recommended as overheating could endanger both the card itself and the system in which it is installed.
In the case of a single-channel multiplexer (MUX type) sub-unit this function will only permit writing an array of nulls to clear it. MUX sub-units are more conveniently operated using pipx40_setChannelState and pipx40_clearSub.
Warning
The data array pointed to must contain sufficient bits to represent the bit-pattern for the specified sub-unit, or undefined data will be written to the more significant bits.
Visual Basic Note
To use this function in Visual Basic, it must be passed a pointer to the first element of the data array. For example (assuming a zero-based array):
pipx40_setChannelPattern(vi, subUnit, pattern(0))
Example Code