Repeated Capabilities

Repeated capabilities attributes are used to set the channel_string parameter to the underlying driver function call. This can be the actual function based on the Session method being called, or it can be the appropriate Get/Set Attribute function, such as niDigital_SetAttributeViInt32().

Repeated capabilities attributes use the indexing operator [] to indicate the repeated capabilities. The parameter can be a string, list, tuple, or slice (range). Each element of those can be a string or an integer. If it is a string, you can indicate a range using the same format as the driver: ‘0-2’ or ‘0:2’

Some repeated capabilities use a prefix before the number and this is optional

channels

nidigital.Session.channels[]
session.channels['0-2'].channel_enabled = True

passes a string of ‘0, 1, 2’ to the set attribute function.

pins

nidigital.Session.pins[]
session.pins['0-2'].channel_enabled = True

passes a string of ‘0, 1, 2’ to the set attribute function.

instruments

nidigital.Session.instruments[]
session.instruments['0-2'].channel_enabled = True

passes a string of ‘0, 1, 2’ to the set attribute function.

pattern_opcode_events

nidigital.Session.pattern_opcode_events[]

If no prefix is added to the items in the parameter, the correct prefix will be added when the driver function call is made.

session.pattern_opcode_events['0-2'].channel_enabled = True

passes a string of ‘patternOpcodeEvent0, patternOpcodeEvent1, patternOpcodeEvent2’ to the set attribute function.

If an invalid repeated capability is passed to the driver, the driver will return an error.

You can also explicitly use the prefix as part of the parameter, but it must be the correct prefix for the specific repeated capability.

session.pattern_opcode_events['patternOpcodeEvent0-patternOpcodeEvent2'].channel_enabled = True

passes a string of ‘patternOpcodeEvent0, patternOpcodeEvent1, patternOpcodeEvent2’ to the set attribute function.

conditional_jump_triggers

nidigital.Session.conditional_jump_triggers[]

If no prefix is added to the items in the parameter, the correct prefix will be added when the driver function call is made.

session.conditional_jump_triggers['0-2'].channel_enabled = True

passes a string of ‘conditionalJumpTrigger0, conditionalJumpTrigger1, conditionalJumpTrigger2’ to the set attribute function.

If an invalid repeated capability is passed to the driver, the driver will return an error.

You can also explicitly use the prefix as part of the parameter, but it must be the correct prefix for the specific repeated capability.

session.conditional_jump_triggers['conditionalJumpTrigger0-conditionalJumpTrigger2'].channel_enabled = True

passes a string of ‘conditionalJumpTrigger0, conditionalJumpTrigger1, conditionalJumpTrigger2’ to the set attribute function.

sites

nidigital.Session.sites[]

If no prefix is added to the items in the parameter, the correct prefix will be added when the driver function call is made.

session.sites['0-2'].channel_enabled = True

passes a string of ‘site0, site1, site2’ to the set attribute function.

If an invalid repeated capability is passed to the driver, the driver will return an error.

You can also explicitly use the prefix as part of the parameter, but it must be the correct prefix for the specific repeated capability.

session.sites['site0-site2'].channel_enabled = True

passes a string of ‘site0, site1, site2’ to the set attribute function.

rio_events

nidigital.Session.rio_events[]

If no prefix is added to the items in the parameter, the correct prefix will be added when the driver function call is made.

session.rio_events['0-2'].channel_enabled = True

passes a string of ‘RIOEvent0, RIOEvent1, RIOEvent2’ to the set attribute function.

If an invalid repeated capability is passed to the driver, the driver will return an error.

You can also explicitly use the prefix as part of the parameter, but it must be the correct prefix for the specific repeated capability.

session.rio_events['RIOEvent0-RIOEvent2'].channel_enabled = True

passes a string of ‘RIOEvent0, RIOEvent1, RIOEvent2’ to the set attribute function.

rio_triggers

nidigital.Session.rio_triggers[]

If no prefix is added to the items in the parameter, the correct prefix will be added when the driver function call is made.

session.rio_triggers['0-2'].channel_enabled = True

passes a string of ‘RIOTrigger0, RIOTrigger1, RIOTrigger2’ to the set attribute function.

If an invalid repeated capability is passed to the driver, the driver will return an error.

You can also explicitly use the prefix as part of the parameter, but it must be the correct prefix for the specific repeated capability.

session.rio_triggers['RIOTrigger0-RIOTrigger2'].channel_enabled = True

passes a string of ‘RIOTrigger0, RIOTrigger1, RIOTrigger2’ to the set attribute function.