Source code for RsFsw.Implementations.Instrument.Create.New

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal.Types import DataType
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle
from .... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class NewCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("new", core, parent)

[docs] def set(self, channel_type: enums.ChannelType, channel_name: str) -> None: """ ``INSTrument:CREate[:NEW]`` \n Snippet: ``driver.instrument.create.new.set(channel_type = enums.ChannelType.IqAnalyzer=IQ, channel_name = 'abc')`` \n Adds a measurement channel. You can configure up to 10 measurement channels at the same time (depending on available memory) . See also \n - method ``RsFsw.instrument.select.set()`` - method ``RsFsw.instrument.delete()`` :param channel_type: (enum or string) Channel type of the new channel. For a list of available channel types, see method ``RsFsw.instrument.listPy.get()`` . :param channel_name: String containing the name of the channel. Note that you cannot assign an existing channel name to a new channel. If you do, an error occurs. """ param = ArgSingleList().compose_cmd_string(ArgSingle('channel_type', channel_type, DataType.EnumExt, enums.ChannelType), ArgSingle('channel_name', channel_name, DataType.String)) self._core.io.write_with_opc(f'INSTrument:CREate:NEW {param}'.rstrip()) self._core.io.write('INIT:CONT OFF')