From HFML-FELIX Wiki
Revision as of 16:49, 19 January 2024 by Claessen (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
nanotecd
MQTT daemon
nanotecd
Exchanges data with Nanotec motor drives and MQTT
Language Python
Hosts felix-control
Repository nanotec on gitlab
Topic Description Values
FELIX/Nanotec/C5E-0(1-10)/input/(1-5)/state state of the digital input boolean (eg. "False or "True")
FELIX/Nanotec/C5E-0(1-10)/input/(1-5)/function short description of the purpose of the input ascii text
FELIX/Nanotec/C5E-0(1-10)/output/(1-3)/state state of the digital output boolean (eg. "False or "True")
FELIX/Nanotec/C5E-0(1-10)/output/(1-3)/function short description of the purpose of the output ascii text
FELIX/Nanotec/C5E-0(1-10)/analog/(1-2)/value 10-bit value of analog input number (eg. "1023")
FELIX/Nanotec/C5E-0(1-10)/analog/(1-2)/function short description of the purpose of the analog input ascii text
FELIX/Nanotec/C5E-0(1-10)/board_information/acceleration acceleration in step/s^2 number(eg. "100")
FELIX/Nanotec/C5E-0(1-10)/board_information/controlmode indicate local or remote control ascii text (eg. "Remote" or "Local")
FELIX/Nanotec/C5E-0(1-10)/board_information/error indicate if there is an error active boolean (eg. "False or "True")
FELIX/Nanotec/C5E-0(1-10)/board_information/errorcode indication of what error is active ascii text
FELIX/Nanotec/C5E-0(1-10)/board_information/firmware_version indication of firmware version inside the controller ascii text
FELIX/Nanotec/C5E-0(1-10)/board_information/macadress mac adress of the driver board ascii text
FELIX/Nanotec/C5E-0(1-10)/board_information/mode mode in which the driver is in ascii text (eg. "Profile Position")
FELIX/Nanotec/C5E-0(1-10)/board_information/motorcurrent current setting of the motor with unit ascii text (eg. "500mA")
FELIX/Nanotec/C5E-0(1-10)/board_information/moving indicator from the driver if it is moving or not boolean (eg. "False or "True")
FELIX/Nanotec/C5E-0(1-10)/board_information/nanoj status if onboard user code execution is running or not(eg. takes care of local control) ascii text (eg. "Running")
FELIX/Nanotec/C5E-0(1-10)/board_information/position step position of the driver number (eg. "50000")
FELIX/Nanotec/C5E-0(1-10)/board_information/serialnumber serialnumber of the driver ascii text (eg. "756285476")
FELIX/Nanotec/C5E-0(1-10)/board_information/softlimit_min minimum value of the step position, any value below this will not be accepted as valid move number (eg. "-1000000")
FELIX/Nanotec/C5E-0(1-10)/board_information/softlimit_max maximum value of the step position, any value above this will not be accepted as valid move number (eg. "1000000")
FELIX/Nanotec/C5E-0(1-10)/board_information/speed movement speed in step/s number (eg. "1337")
FELIX/Nanotec/C5E-0(1-10)/board_information/status value of the internal state machine of the driver ascii text (eg. "Switch on disabled")
FELIX/Nanotec/C5E-0(1-10)/board_information/target_reached value of the internal state machine if the setpoint position is achieved boolean (eg. "False or "True")
FELIX/Nanotec/C5E-0(1-10)/board_information/temperature temperature of the driver board in degrees celsius float (eg. "31.4")
FELIX/Nanotec/C5E-0(1-10)/board_information/type type nr. of the driver board ascii text (eg. "C5-E-1-81")
FELIX/Nanotec/C5E-0(1-10)/board_information/uptime uptime counter of the driver ascii text (eg. "1 Days 18:11:40")
FELIX/Nanotec/C5E-0(1-10)/board_information/voltage voltage level of the driver stage float (eg. "19.105")
FELIX/nanotec/servers/host_pid server declaration json formatted text {"startdate": "date time", "state": "active or passive", "hostname": "hostname", "pid": pid}
FELIX/nanotec/clients/host_pid client declaration
Note: published by clients, not by this daemon
json formatted text {"hostname": "hostname", "pid": pid,"state":"master or slave","subsystem":"nanotec","starttime":timestamp}
FELIX/nanotec/daemon_time system time of the host the daemon runs on unix timestamp (e.g. 1550680653.91)
FELIX/nanotec/daemon_time/readable system time of the host the daemon runs on human-readable timestamp (e.g. Wed Feb 20 17:37:59 2019)

Write

[edit | edit source]
Topic Description Values
FELIX/Nanotec/C5E-0(1-10)/board_information/acceleration/command acceleration in step/s^2 number(eg. "100")
FELIX/Nanotec/C5E-0(1-10)/board_information/deceleration/command deceleration in step/s^2 number(eg. "100")
FELIX/Nanotec/C5E-0(1-10)/board_information/speed/command movement speed in step/s number (eg. "1337")
FELIX/Nanotec/C5E-0(1-10)/board_information/position/command step position of the driver ascii text (eg. "50000")
FELIX/Nanotec/C5E-0(1-10)/board_information/softlimit_min/command minimum value of the step position, any value below this will not be accepted as valid move number (eg. "-1000000")
FELIX/Nanotec/C5E-0(1-10)/board_information/softlimit_max/command maximum value of the step position, any value above this will not be accepted as valid move number (eg. "1000000")
FELIX/Nanotec/C5E-0(1-10)/board_information/motorcurrent/command current setting of the motor ascii text (eg. "500")
FELIX/Nanotec/C5E-0(1-10)/board_information/kill/command kill command of move, directly kills motion, value can be anything, publishing to this topic kills anyway boolean (eg. "True")
FELIX/Nanotec/C5E-0(1-10)/board_information/stop/command stop command of move, slowly stop motion boolean (eg. "True")
FELIX/Nanotec/C5E-0(1-10)/board_information/reboot/command soft reboot the controller, value can be anything, publishing to this topic reboots anyway boolean (eg. "True")

Config

[edit | edit source]

Hold Registers

[edit | edit source]
-----------------------------------
mapping of Modbus Holding Registers
-----------------------------------
Statusword

3602:01=0x60410010

NanoJ Status

3602:02=0x23010008

Modes of operation display

3602:03=0x60610008

Position actual value

3602:04=0x60640020

Digital Inputs

3602:05=0x60FD0020

Digital Outputs

3602:06=0x60FE0120

Analog inputs - Analogue input 1

3602:07=0x32200110

Analog inputs - Analogue input 2

3602:08=0x32200210

Software position limit - Min position limit

3602:09=0x607D0120 Software position limit - Max position limit 3602:0A=0x607D0220

Operating conditions - Temperature PCB [Celsius * 10]

3602:0B=0x40140320

Uptime [Seconds]

3602:0C=0x230F0020

Voltage [mV]

3602:0D=0x40140120

Velocity [steps/s]

3602:0E=0x60810020

Acceleration [steps/s^2]

3602:0F=0x60830020

Control word

3602:10=0x60400010