Function createEncoderRegisterCommunicationOsCommand

  • OS command 0: Encoder register communication

    This OS command is utilized for reading or writing registers from an encoder service. Presently, the only service supporting this functionality is BiSS, but it can be easily extended to other encoder services. For more information on how BiSS register communication operates, please consult the official BiSS C Interface Protocol Description.

    Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
    Byte 0 0 0 0 0 0 0 0 0
    Byte 1 - - - - - A A A
    Byte 2 B B B B B B B C
    Byte 3 D D D D D D D D
    Byte 4 E E E E E E E E
    Byte 5 - - - - - - - -
    Byte 6 - - - - - - - -
    Byte 7 - - - - - - - -

    Parameters

    • encoderOrdinal: number = 1

      (A) 2^3=8 encoder ordinals. Counting starts from 1, so '1' refers to Encoder 1 configured in 0x2110.

    • slaveAddress: number = 0

      (B) 2^7=128 slave addresses. Select the address of the slave to read (BiSS protocol level). Since our BiSS service doesn't support multiple slaves in the same device, this value should always be 0.

    • rw: number = 0

      (C) Read or write the encoder register. Select the direction of the command: 0 for reading a register, and 1 for writing it.

    • registerAddress: number = 0

      (D) Register to be read/written.

    • registerWriteValue: number = 0

      (E) The value to write to the register. This value is ignored when reading a register (when rw is set to 0).

    Returns Uint8Array

Generated using TypeDoc