qmi.instruments.nkt_photonics.nkt_photonics_interbus_protocol
Driver for the NKT Photonics Interbus protocol.
The communication protocol to the laser driver is documented in the “Software Development Kit for NKT Photonics Instruments - Instruction Manual” document, v 2.1.3, Oct 2018. [Reference 1].
Chapter 2 of this document describes the NKT Photonocs Interbus protocol (physical, framing, CRC, etc.)
This chapter says, at the start:
- “This section describes the NKT Photonics Interbus protocol and module hardware integration.
It is not to be confused with INTERBUS developed by Phoenix Contact.”
Classes
|
Message for the NKT Interbus protocol. |
|
|
|
This is a wrapper around a QMI_Transport that provides NKT Photonics Interbus communication primitives. |
|
- class qmi.instruments.nkt_photonics.nkt_photonics_interbus_protocol.MessageType(value)
- NACK = 0
Response. Message not understood, not applicable, or not allowed (Not acknowledged).
- CRC_ERROR = 1
Response. CRC error in received message.
- BUSY = 2
Response. Cannot respond at the moment. Module too busy.
- ACK = 3
Response. Received message understood (Acknowledged).
- READ = 4
Query. Read the contents of a register.
- WRITE = 5
Transmission. Write something to a register.
- SET_SINGLE_BIT = 6
Transmission. Write a logic one to a bit will set the corresponding bit in the register value. Logic zeros have no effect.
- CLEAR_SINGLE_BIT = 7
Transmission. Writing a logic one to a bit will clear the corresponding bit in the register value. Logic zeros have no effect.
- DATAGRAM = 8
Response. Register content returned; caused by a previous READ.
- TOGGLE_SINGLE_BIT = 9
Transmission. Writing a logic one to a bit will invert (toggle) the corresponding bit in the register value. Logic zeros have no effect.
- class qmi.instruments.nkt_photonics.nkt_photonics_interbus_protocol.RegisterNumber(value)
- MODULE_TYPE = 97
Module type number. Is used to determine what type of module the host is communicating with.
- SERIAL_NUMBER = 100
Firmware version code.
- STATUS_BITS = 102
Status monitor for a module or system.
- ERROR_CODE = 103
Error code as a byte value.
- class qmi.instruments.nkt_photonics.nkt_photonics_interbus_protocol.InterbusMessage(destination: int, source: int, message_type: MessageType, register_number: int, data: bytes)
Message for the NKT Interbus protocol.
- destination: int
Alias for field number 0
- source: int
Alias for field number 1
- message_type: MessageType
Alias for field number 2
- register_number: int
Alias for field number 3
- data: bytes
Alias for field number 4
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- class qmi.instruments.nkt_photonics.nkt_photonics_interbus_protocol.NKTPhotonicsInterbusProtocol(transport: QMI_Transport, timeout: float)
This is a wrapper around a QMI_Transport that provides NKT Photonics Interbus communication primitives.
- get_register(destination: int, register_number: int) bytes
Read the specified register.
- set_register(destination: int, register_number: int, data: bytes | None) None
Write to the specified register.