channel

The channel commands module.

These commands are used in the following models: DAQ6510

THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.

Please report an issue if one is found.

Attributes and Functions
- channel.close()
- channel.getclose()
- channel.getcommonside()
- channel.getcount()
- channel.getcountinterval()
- channel.getdelay()
- channel.getdmm()
- channel.getlabel()
- channel.getmatch()
- channel.getmatchtype()
- channel.getmode()
- channel.getstate()
- channel.gettype()
- channel.getwidth()
- channel.multiple.close()
- channel.multiple.open()
- channel.open()
- channel.read()
- channel.setcommonside()
- channel.setcountinterval()
- channel.setdelay()
- channel.setdmm()
- channel.setlabel()
- channel.setmatch()
- channel.setmatchtype()
- channel.setmode()
- channel.setwidth()
- channel.write()

Channel

Bases: BaseTSPCmd

The channel command tree.

Constants
  • .COUNT_INTERVAL_10M: The storage of channel relay closure count is set to 10 minutes.
  • .COUNT_INTERVAL_15M: The storage of channel relay closure count is set to 15 minutes.
  • .COUNT_INTERVAL_1M: The storage of channel relay closure count is set to 1 minute.
  • .COUNT_INTERVAL_24H: The storage of channel relay closure count is set to 24 hours.
  • .COUNT_INTERVAL_30M: The storage of channel relay closure count is set to 30 minutes.
  • .COUNT_INTERVAL_5M: The storage of channel relay closure count is set to 5 minutes.
  • .COUNT_INTERVAL_60M: The storage of channel relay closure count is set to 60 minutes.
  • .IND_CLOSED: Channel is closed.
  • .IND_MATCH: Digital I/O or totalizer channel value is matched.
  • .IND_OVERFLOW: Totalizer channel has overflowed.
  • .MATCH_ANY: For an any match, a match is when the match value equals the channel-read value.
  • .MATCH_EXACT: The state match indicator only becomes true when the match value equals the channel-read value.
  • .MATCH_NONE: When none is set, matching is disabled.
  • .MATCH_UNCHANGED: For an unchanged match, the value should be the same as the original. If not, a match is declared.
  • .MODE_FALLING_EDGE: For totalizer channels, select falling edge.
  • .MODE_FALLING_EDGE_READ_RESET: For totalizer channels, select falling edge, then reset the count on read.
  • .MODE_INPUT: Set digital channel to input.
  • .MODE_OUTPUT: Set digital channel to output.
  • .MODE_RISING_EDGE: For totalizer channels, select rising edge.
  • .MODE_RISING_EDGE_READ_RESET: For totalizer channels, select rising edge, then reset the count on read.
  • .TYPE_BACKPLANE: Backplane.
  • .TYPE_DAC: DAC channel.
  • .TYPE_DIGITAL: Digital channel.
  • .TYPE_POLE: Pole channel.
  • .TYPE_RADIO: Radio channel.
  • .TYPE_SWITCH: Switch channel.
  • .TYPE_TOTALIZER: Totalizer channel.
Properties and methods
  • .close(): The channel.close() function.
  • .getclose(): The channel.getclose() function.
  • .getcommonside(): The channel.getcommonside() function.
  • .getcount(): The channel.getcount() function.
  • .getcountinterval(): The channel.getcountinterval() function.
  • .getdelay(): The channel.getdelay() function.
  • .getdmm(): The channel.getdmm() function.
  • .getlabel(): The channel.getlabel() function.
  • .getmatch(): The channel.getmatch() function.
  • .getmatchtype(): The channel.getmatchtype() function.
  • .getmode(): The channel.getmode() function.
  • .getstate(): The channel.getstate() function.
  • .gettype(): The channel.gettype() function.
  • .getwidth(): The channel.getwidth() function.
  • .multiple: The channel.multiple command tree.
  • .open(): The channel.open() function.
  • .read(): The channel.read() function.
  • .setcommonside(): The channel.setcommonside() function.
  • .setcountinterval(): The channel.setcountinterval() function.
  • .setdelay(): The channel.setdelay() function.
  • .setdmm(): The channel.setdmm() function.
  • .setlabel(): The channel.setlabel() function.
  • .setmatch(): The channel.setmatch() function.
  • .setmatchtype(): The channel.setmatchtype() function.
  • .setmode(): The channel.setmode() function.
  • .setwidth(): The channel.setwidth() function.
  • .write(): The channel.write() function.

COUNT_INTERVAL_10M class-attribute instance-attribute

COUNT_INTERVAL_10M = 'channel.COUNT_INTERVAL_10M'

COUNT_INTERVAL_15M class-attribute instance-attribute

COUNT_INTERVAL_15M = 'channel.COUNT_INTERVAL_15M'

COUNT_INTERVAL_1M class-attribute instance-attribute

COUNT_INTERVAL_1M = 'channel.COUNT_INTERVAL_1M'

COUNT_INTERVAL_24H class-attribute instance-attribute

COUNT_INTERVAL_24H = 'channel.COUNT_INTERVAL_24H'

COUNT_INTERVAL_30M class-attribute instance-attribute

COUNT_INTERVAL_30M = 'channel.COUNT_INTERVAL_30M'

COUNT_INTERVAL_5M class-attribute instance-attribute

COUNT_INTERVAL_5M = 'channel.COUNT_INTERVAL_5M'

COUNT_INTERVAL_60M class-attribute instance-attribute

COUNT_INTERVAL_60M = 'channel.COUNT_INTERVAL_60M'

IND_CLOSED class-attribute instance-attribute

IND_CLOSED = 'channel.IND_CLOSED'

IND_MATCH class-attribute instance-attribute

IND_MATCH = 'channel.IND_MATCH'

IND_OVERFLOW class-attribute instance-attribute

IND_OVERFLOW = 'channel.IND_OVERFLOW'

MATCH_ANY class-attribute instance-attribute

MATCH_ANY = 'channel.MATCH_ANY'

MATCH_EXACT class-attribute instance-attribute

MATCH_EXACT = 'channel.MATCH_EXACT'

MATCH_NONE class-attribute instance-attribute

MATCH_NONE = 'channel.MATCH_NONE'

MATCH_UNCHANGED class-attribute instance-attribute

MATCH_UNCHANGED = 'channel.MATCH_UNCHANGED'

MODE_FALLING_EDGE class-attribute instance-attribute

MODE_FALLING_EDGE = 'channel.MODE_FALLING_EDGE'

MODE_FALLING_EDGE_READ_RESET class-attribute instance-attribute

MODE_FALLING_EDGE_READ_RESET = 'channel.MODE_FALLING_EDGE_READ_RESET'

MODE_INPUT class-attribute instance-attribute

MODE_INPUT = 'channel.MODE_INPUT'

MODE_OUTPUT class-attribute instance-attribute

MODE_OUTPUT = 'channel.MODE_OUTPUT'

MODE_RISING_EDGE class-attribute instance-attribute

MODE_RISING_EDGE = 'channel.MODE_RISING_EDGE'

MODE_RISING_EDGE_READ_RESET class-attribute instance-attribute

MODE_RISING_EDGE_READ_RESET = 'channel.MODE_RISING_EDGE_READ_RESET'

TYPE_BACKPLANE class-attribute instance-attribute

TYPE_BACKPLANE = 'channel.TYPE_BACKPLANE'

TYPE_DAC class-attribute instance-attribute

TYPE_DAC = 'channel.TYPE_DAC'

TYPE_DIGITAL class-attribute instance-attribute

TYPE_DIGITAL = 'channel.TYPE_DIGITAL'

TYPE_POLE class-attribute instance-attribute

TYPE_POLE = 'channel.TYPE_POLE'

TYPE_RADIO class-attribute instance-attribute

TYPE_RADIO = 'channel.TYPE_RADIO'

TYPE_SWITCH class-attribute instance-attribute

TYPE_SWITCH = 'channel.TYPE_SWITCH'

TYPE_TOTALIZER class-attribute instance-attribute

TYPE_TOTALIZER = 'channel.TYPE_TOTALIZER'

multiple property

multiple: ChannelMultiple

Return the channel.multiple command tree.

Sub-properties and sub-methods
  • .close(): The channel.multiple.close() function.
  • .open(): The channel.multiple.open() function.

close

close(channel_list: str) -> None

Run the channel.close() function.

Description
  • This function closes the channels and channel pairs that are specified by the channel list parameter.
TSP Syntax
- channel.close()
Parameters:
  • channel_list (str) –

    A string that lists the channels and channel pairs to close.

Raises:

getclose

getclose(channel_list: str | None = None) -> str

Run the channel.getclose() function.

Description
  • This function queries for the closed channels indicated by the channel list parameter.
TSP Syntax
- channel.getclose()
Parameters:
  • channel_list (optional, default: None ) –

    A string that lists the channels to be queried (including allslots, slot1, or slot2 to get information on all channels in both slots or a specific slot); returns all slots if nothing is specified.

Returns:
  • str

    The result of the function call.

Raises:

getcommonside

getcommonside(slot: str) -> str

Run the channel.getcommonside() function.

Description
  • This function lists the commonside setting for the specified slot.
TSP Syntax
- channel.getcommonside()
Parameters:
  • slot (str) –

    A string that lists the slot number; can be allslots, slot1, or slot2.

Returns:
  • str

    The result of the function call.

Raises:

getcount

getcount(channel_list: str) -> str

Run the channel.getcount() function.

Description
  • This function returns the number of times the relays have been closed for the specified channels.
TSP Syntax
- channel.getcount()
Parameters:
  • channel_list (str) –

    A string listing the items to query, which can include.

Returns:
  • str

    The result of the function call.

Raises:

getcountinterval

getcountinterval() -> str

Run the channel.getcountinterval() function.

Description
  • This function returns the interval that is presently set for storage of channel relay closure counts.
TSP Syntax
- channel.getcountinterval()
Returns:
  • str

    The result of the function call.

Raises:

getdelay

getdelay(channel_list: str) -> str

Run the channel.getdelay() function.

Description
  • This function queries for the additional delay time for the specified channels.
TSP Syntax
- channel.getdelay()
Parameters:
  • channel_list (str) –

    A string listing the channels to query for their delay times; slot1, slot2, or allslots allowed.

Returns:
  • str

    The result of the function call.

Raises:

getdmm

getdmm(channel_list: str, setting: str) -> str

Run the channel.getdmm() function.

Description
  • This function returns the setting for a channel DMM attribute.
TSP Syntax
- channel.getdmm()
Parameters:
  • channel_list (str) –

    List of channels to get from the DMM.

  • setting (str) –

    The DMM function or the parameter values to return for the selected channels.

Returns:
  • str

    The result of the function call.

Raises:

getlabel

getlabel(channel_number: str) -> str

Run the channel.getlabel() function.

Description
  • This function returns the label associated with the specified channel.
TSP Syntax
- channel.getlabel()
Parameters:
  • channel_number (str) –

    A string that lists the channel to query for the associated label.

Returns:
  • str

    The result of the function call.

Raises:

getmatch

getmatch(channel_list: str) -> str

Run the channel.getmatch() function.

Description
  • This function gets the match value on a channel.
TSP Syntax
- channel.getmatch()
Parameters:
  • channel_list (str) –

    String specifying digital I/O or totalizer channels to query, using normal channel list syntax.

Returns:
  • str

    The result of the function call.

Raises:

getmatchtype

getmatchtype(channel_list: str) -> str

Run the channel.getmatchtype() function.

Description
  • This function returns the match type for digital I/O and totalizer channels.
TSP Syntax
- channel.getmatchtype()
Parameters:
  • channel_list (str) –

    String specifying the digital I/O or totalizer channels to query, using normal channel list syntax.

Returns:
  • str

    The result of the function call.

Raises:

getmode

getmode(channel_list: str) -> str

Run the channel.getmode() function.

Description
  • This function returns the present mode of digital and totalizer channels.
TSP Syntax
- channel.getmode()
Parameters:
  • channel_list (str) –

    String that specifies the channels to query, using normal channel list syntax.

Returns:
  • str

    The result of the function call.

Raises:

getstate

getstate(channel_list: str | None = None) -> str

Run the channel.getstate() function.

Description
  • This function returns the state indicators of the channels in the instrument.
TSP Syntax
- channel.getstate()
Parameters:
  • channel_list (optional, default: None ) –

    String specifying the channels to query; use normal channel list syntax; if no channels are defined, all slots are returned.

Returns:
  • str

    The result of the function call.

Raises:

gettype

gettype(channel_list: str) -> str

Run the channel.gettype() function.

Description
  • This function returns the type associated with a channel.
TSP Syntax
- channel.gettype()
Parameters:
  • channel_list (str) –

    String specifying the channels to query, using normal channelList syntax.

Returns:
  • str

    The result of the function call.

Raises:

getwidth

getwidth(channel_number: int) -> str

Run the channel.getwidth() function.

Description
  • This function gets the width used by the channel.
TSP Syntax
- channel.getwidth()
Parameters:
  • channel_number (int) –

    The first channel number of the channels to be combined.

Returns:
  • str

    The result of the function call.

Raises:

open

open(channel_list: str) -> None

Run the channel.open() function.

Description
  • This command opens the specified channels and channel pairs.
TSP Syntax
- channel.open()
Parameters:
  • channel_list (str) –

    String listing the channels to open; allslots, slot1, and slot2 available, which open all channels on all slots, all channels on slot 1, or all channels on slot 2.

Raises:

read

read(channel_list: str, reading_buffer: str | None = None) -> str

Run the channel.read() function.

Description
  • This function reads a value from a totalizer, DAC, or digital I/O channel.
TSP Syntax
- channel.read()
Parameters:
  • channel_list (str) –

    String that specifies a list of channels, using channel list notation.

  • reading_buffer (optional, default: None ) –

    Reading buffer in which to store read values.

Returns:
  • str

    The result of the function call.

Raises:

setcommonside

setcommonside(slot: str, state: str) -> None

Run the channel.setcommonside() function.

Description
  • This function sets up the specified slot to have a common side path.
TSP Syntax
- channel.setcommonside()
Parameters:
  • slot (str) –

    A string that lists the slot number; can be allslots, slot1, or slot2.

  • state (str) –

    channel.ON or channel.OFF.

Raises:

setcountinterval

setcountinterval(interval: str) -> None

Run the channel.setcountinterval() function.

Description
  • This function determines how often the instrument stores the channel relay closure count.
TSP Syntax
- channel.setcountinterval()
Parameters:
  • interval (str) –

    The count update interval.

Raises:

setdelay

setdelay(channel_list: str, delay: float) -> None

Run the channel.setdelay() function.

Description
  • This function sets additional delay time for specified channels.
TSP Syntax
- channel.setdelay()
Parameters:
  • channel_list (str) –

    A string listing the channels for which to add delay time.

  • delay (float) –

    Delay time for the selected channels; minimum is 0 seconds.

Raises:

setdmm

setdmm(channel_list: str, setting: str, value: str) -> None

Run the channel.setdmm() function.

Description
  • This function configures the DMM for a channel or group of channels.
TSP Syntax
- channel.setdmm()
Parameters:
  • channel_list (str) –

    List of channels for which to set the DMM.

  • setting (str) –

    The DMM function or the parameter for the function to be applied to the channelList; refer to Details and the tables following the examples.

  • value (str) –

    The function or attribute value.

Raises:

setlabel

setlabel(channel_number: str, labelname: str) -> None

Run the channel.setlabel() function.

Description
  • This function sets the label associated with a channel.
TSP Syntax
- channel.setlabel()
Parameters:
  • channel_number (str) –

    A string that lists the channel for which to set the label.

  • labelname (str) –

    A string that contains the label for the channel in channelNumber, up to 19 characters.

Raises:

setmatch

setmatch(channel_list: str, match_value: str, mask: str | None = None) -> None

Run the channel.setmatch() function.

Description
  • This function sets the match value on a digital input or totalizer channel.
TSP Syntax
- channel.setmatch()
Parameters:
  • channel_list (str) –

    String that specifies the channels to query, using normal channel list syntax.

  • match_value (str) –

    Channel value to compare on the specified channel.

  • mask (optional, default: None ) –

    Value to specify the bits used to mask matchValue.

Raises:

setmatchtype

setmatchtype(channel_list: str, type_: str) -> None

Run the channel.setmatchtype() function.

Description
  • This function sets the match type on a digital I/O or totalizer channel.
TSP Syntax
- channel.setmatchtype()
Parameters:
  • channel_list (str) –

    String specifying the channels to set, using normal channel list syntax.

  • type_ (str) –

    A value for setting the match operation used on this specific channel.

Raises:

setmode

setmode(channel_list: str, mode: str) -> None

Run the channel.setmode() function.

Description
  • This function sets the mode of operation of a channel.
TSP Syntax
- channel.setmode()
Parameters:
  • channel_list (str) –

    String specifying the channels to set, using normal channel list syntax.

  • mode (str) –

    The mode of operation for a channel; for digital channels, the options are.

Raises:

setwidth

setwidth(channel_number: int, width: int) -> None

Run the channel.setwidth() function.

Description
  • This function allows you to control multiple digital I/O channels as one channel.
TSP Syntax
- channel.setwidth()
Parameters:
  • channel_number (int) –

    The first channel number of the channels to be combined.

  • width (int) –

    The number of channels to combine.

Raises:

write

write(channel_list: str, value: str) -> None

Run the channel.write() function.

Description
  • This function writes a value to a channel.
TSP Syntax
- channel.write()
Parameters:
  • channel_list (str) –

    The channels to set, using standard channel naming.

  • value (str) –

    The value to be written to the channel (must be decimal value).

Raises:

ChannelMultiple

Bases: BaseTSPCmd

The channel.multiple command tree.

Properties and methods
  • .close(): The channel.multiple.close() function.
  • .open(): The channel.multiple.open() function.

close

close(channel_list: str) -> None

Run the channel.multiple.close() function.

Description
  • This function closes the listed channels without affecting any other channels.
TSP Syntax
- channel.multiple.close()
Parameters:
  • channel_list (str) –

    The list of channels to close.

Raises:

open

open(channel_list: str) -> None

Run the channel.multiple.open() function.

Description
  • This function opens the channels in the channel list without affecting any others.
TSP Syntax
- channel.multiple.open()
Parameters:
  • channel_list (str) –

    A list of the channels to open.

Raises: