Jump to content

SENSBLUE ATLAS/Datasheet: Difference between revisions

No edit summary
No edit summary
Line 5,939: Line 5,939:


===== 24.14.3 Runtime Operations =====
===== 24.14.3 Runtime Operations =====
Supported runtime aliases include <small>'''READ, READ_CONTINUOUS, STOP_READ_CONTINUOUS, READ_PDO_CONTINUOUS, STOP_READ_PDO_CONTINUOUS, PING, NMT_COMMAND, SDO_READ, SDO_WRITE, READ_HEARTBEAT, RECV_PDO, RECV_EMCY'''</small>, and <small>'''QUERY_NODE_INFO'''</small><small>'''.'''</small>
====== NMT Control ======
'''Req-Topic''': canopenRM8007/runtime/in<syntaxhighlight lang="json" line="1">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "alias": "CONFIG_CANOPEN",
    "taskParams": {
      "defaults": {
        "sdo_timeout": "<SDO_TIMEOUT>"
      },
      "nodes": {
        "<NODE_NAME>": {
          "node_id": "<NODE_ID>",
          "steps_per_rev": "<STEPS_PER_REV>"
        }
      }
    }
  }
}
</syntaxhighlight>'''Reply-Topic''': canopenRM8007/runtime/out<syntaxhighlight lang="json" line="1">
{
  "id": "<TIMESTAMP>",
  "origin": "canopen-actor",
  "task": {
    "alias": "NMT_COMMAND",
    "taskResult": {
      "success": true,
      "id": "nmt-start-node5",
      "node_id": 5,
      "command": "START",
      "confirmed": true,
      "state": null
    }
  }
}
</syntaxhighlight>
* '''Supported NMT Commands'''
{| class="wikitable"
|'''Command'''
|'''Meaning'''
|'''Notes'''
|-
|START
| Puts the node into Operational state.
|If '''wait''' = '''true''', the actor waits for heartbeat state '''OPERATIONAL'''.
|-
|STOP
| Puts the node into Stopped state.
|If '''wait''' = '''true''', the actor waits for heartbeat state '''STOPPED'''.
|-
|PRE_OP
|Puts the node into Pre-Operational state.
|Used before operations such as PDO remapping.
|-
|PRE-OP
|Same as '''PRE_OP'''.
|Alternative accepted spelling.
|-
|PREOP
|Same as '''PRE_OP'''.
|Alternative accepted spelling.
|-
|PRE_OPERATIONAL
|Same as '''PRE_OP'''.
|Alternative accepted spelling.
|-
|RESET_NODE
|Resets the CANopen node application.
|If '''wait''' = '''true''', the actor waits for boot-up heartbeat.
|-
|RESET
|Same as '''RESET_NODE'''.
|Alternative accepted spelling.
|-
|RESET_COMM
|Resets CANopen communication.
|Sends NMT reset communication command.
|}
* '''Request Parameters'''
{| class="wikitable"
|'''Parameter'''
|'''Type'''
|'''Required'''
|'''Example'''
|'''Description'''
|-
|id
| string
|Yes
|"<TIMESTAMP>"
|Unique request identifier. The same value is returned in the response.
|-
|origin
| string
|No
|"APP"
|Identifies the sender of the request, for example '''APP''' , '''NodeRED''' , '''CLI''' , or
'''TestClient'''.
|-
|task
|object
|Yes
|{...}
|Main command object containing the command alias and parameters.
|-
|task.alias
|string
|Yes
|"NMT_COMMAND"
|Defines the command to execute. For this operation, it must be
'''NMT_COMMAND'''.
|-
|task.taskParams
|object
|Yes
|{...}
|Contains the NMT command parameters.
|-
|task.taskParams.node_id
|integer
|Yes
|5
|Numeric CANopen node ID that will receive the NMT command.
|-
|task.taskParams.nodeId
|integer
|Yes
|5
|Alternative spelling for '''node_id'''.
|-
|task.taskParams.node
|string
|Yes
|"motor_1"
|Logical node name previously configured with '''CONFIG_CANOPEN'''.
|-
|task.taskParams.command
|string
|No
|"START"
|NMT command to send. If omitted, the actor defaults to '''START'''.
|-
|task.taskParams.wait
|boolean
|No
|false
|If '''true''', the actor waits for heartbeat/state confirmation when supported. If
'''false''', the command is sent without waiting for confirmation.
|-
|task.taskParams.timeout
|number
|No
|5.0
|Timeout, in seconds, used when waiting for NMT confirmation.
Default is '''5.0'''.
|-
|task.taskParams.sdo_timeout
|number
|No
|2.0
|Internal timeout used when creating/updating the CANopen node wrapper.
Usually not required for basic NMT usage.
|}
* '''Response Parameters'''
{| class="wikitable"
|'''Parameter'''
|'''Type'''
|'''Example'''
|'''Description'''
|-
|id
| string
|"<TIMESTAMP>"
|Same request identifier received in the request. Used to correlate request and
response.
|-
|origin
| string
|"canopen-actor"
|Identifies the component that generated the response.
|-
|task
|object
|{...}
|Main response object.
|-
|task.alias
|string
|"NMT_COMMAND"
|Alias of the command that was executed.
|-
|task.taskResult
|object
|{...}
|Result object containing the NMT command result.
|-
|task.taskResult.success
|boolean
|true
|Indicates whether the actor successfully executed the NMT command.
|-
|task.taskResult.id
|string
|"nmt-start-node5"
|Internal/request ID returned by the CANopen RPC call. Usually matches the
original request '''id'''.
|-
|task.taskResult.node_id
|integer
|5
|CANopen node ID that received the NMT command.
|-
|task.taskResult.command
|string
|"START"
|NMT command that was executed. For aliases such as '''RESET''' , the response may
normalize the command to '''RESET_NODE'''.
|-
|task.taskResult.confirmed
|boolean
|true
|Indicates whether the command was considered successful. If '''wait''' = '''false''' , this
usually means the command was sent successfully. If '''wait''' = '''true''' , this means
the expected heartbeat/state confirmation was received.
|-
|task.taskResult.state
|string/null
|null
|Confirmed NMT state when '''wait''' = '''true''' and state confirmation is available.
Otherwise it is '''null''' . Possible values include '''OPERATIONAL''' , '''STOPPED''' , and '''PRE_OP'''.
|-
|task.taskResult.error
|string
|"unsupported NMT
command X"
|Error description. Present only when the command fails.
|}
====== SDO Read ======
Reads an object dictionary value using SDO upload.
'''Req-Topic''': canopenRM8007/runtime/in<syntaxhighlight lang="json" line="1">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "alias": "SDO_READ",
    "taskParams": {
      "node_id": 5,
      "index": "0x6004",
      "subindex": "0x00",
      "timeout": 2.0
    }
  }
}
</syntaxhighlight>'''Reply-Topic''': canopenRM8007/runtime/out<syntaxhighlight lang="json" line="1">
{
  "id": "<TIMESTAMP>",
  "origin": "canopen-actor",
  "task": {
    "alias": "SDO_READ",
    "taskResult": {
      "success": true,
      "id": "sdo-read-position-node5",
      "node_id": 5,
      "index": 24580,
      "subindex": 0,
      "value": 123456
    }
  }
}
</syntaxhighlight>
* '''Request Parameters'''
{| class="wikitable"
|'''Parameter'''
|'''Type'''
|'''Required'''
|'''Example'''
|'''Description'''
|-
|id
| string
|Yes
|"<TIMESTAMP>"
|Unique request identifier. The same value is returned in the response.
|-
|origin
| string
|No
|"APP"
|Identifies the sender of the request, for example '''APP''' , '''NodeRED''' , '''CLI''' , or
'''TestClient'''.
|-
|task
|object
|Yes
|{...}
|Main command object containing the command alias and parameters.
|-
|task.alias
|string
|Yes
|"SDO_READ"
|Defines the command to execute. For this operation, it must be '''SDO_READ'''.
|-
|task.taskParams
|object
|Yes
|{...}
|Contains the SDO read parameters.
|-
|task.taskParams.node_id
|integer
|Yes
|5
|Numeric CANopen node ID to read from.
|-
|task.taskParams.nodeId
|integer
|Yes
|5
|Alternative spelling for '''node_id'''.
|-
|task.taskParams.node
|string
|Yes
|"motor_1"
|Logical node name previously configured with '''CONFIG_CANOPEN'''.
|-
|task.taskParams.index
|integer/string
|Yes
|"0x6004"
|CANopen object dictionary index to read. Hex strings such as "'''0x6004'''"
are supported.
|-
|task.taskParams.subindex
|integer/string
|No
|"0x00"
|CANopen object dictionary subindex to read. If omitted, defaults to '''0'''.
|-
|task.taskParams.timeout
|number
|No
|2.0
|Timeout, in seconds, used for the SDO read operation. If omitted, the
actor default SDO timeout is used.
|}
* '''Response Parameters'''
{| class="wikitable"
|'''Parameter'''
|'''Type'''
|'''Example'''
|'''Description'''
|-
|id
| string
|"<TIMESTAMP>"
|Same request identifier received in the request. Used to correlate request and
response.
|-
|origin
| string
|"canopen-actor"
|Identifies the component that generated the response.
|-
|task
|object
|{...}
|Main response object.
|-
|task.alias
|string
|"SDO_READ"
|Alias of the command that was executed.
|-
|task.taskResult
|object
|{...}
|Result object containing the SDO read result.
task
|-
|task.taskResult.success
|boolean
|true
|Indicates whether the SDO read was successful.
|-
|task.taskResult.id
|string
|"sdo-read-positionnode5"
|Internal/request ID returned by the CANopen RPC call. Usually matches the
original request '''id'''.
|-
|task.taskResult.node_id
|integer
|5
|CANopen node ID that was read.
|-
|task.taskResult.index
|integer
|24580
|Object dictionary index that was read, returned as decimal. Example: '''24580''' =
'''0x6004'''.
|-
|task.taskResult.subindex
|integer
|0
|Object dictionary subindex that was read.
|-
|task.taskResult.value
|integer
|123456
|Raw value returned by the SDO read operation.
task.
|-
|task.taskResult.error
|string
|"SDO timeout
0x6004:00"
|Error description. Present only when the command fails.
SDO
|}
* SDO Write
Writes an object dictionary value using SDO download.
'''Req-Topic''': canopenRM8007/runtime/in<syntaxhighlight lang="json" line="1">
{
  "id": "<TIMESTAMP>",
  "origin": "APP",
  "task": {
    "alias": "SDO_WRITE",
    "taskParams": {
      "node_id": 5,
      "index": "0x6003",
      "subindex": "0x00",
      "value": 0,
      "size": 4,
      "timeout": 2.0
    }
  }
}
</syntaxhighlight>'''Reply-Topic''': canopenRM8007/runtime/out<syntaxhighlight lang="json" line="1">
{
  "id": "<TIMESTAMP>",
  "origin": "canopen-actor",
  "task": {
    "alias": "SDO_WRITE",
    "taskResult": {
      "success": true,
      "id": "sdo-write-node5",
      "node_id": 5,
      "index": 24579,
      "subindex": 0,
      "value": 0,
      "size": 4
    }
  }
}
</syntaxhighlight>
* '''Parameter descirption'''
{| class="wikitable"
|'''Parameter'''
|'''Type'''
|'''Required'''
|'''Default'''
|'''Description'''
|-
|node_id / nodeId / node
| int/string
|Yes
|—
|CANopen node reference.
|-
|index
| int/string
|Yes
|—
|Object dictionary index.
|-
|subindex
|int/string
|No
|0
|Object dictionary subindex.
|-
|value
|int/string
|Yes
|—
|Value to write.
|-
|size
|int
|No
|4
|Number of bytes: usually '''1''' , '''2''' , or '''4.'''
|-
|timeout
|float
|No
|actor default
|SDO timeout in seconds.
|}
* '''Request Parameters'''
{| class="wikitable"
|'''Parameter'''
|'''Type'''
|'''Required'''
|'''Example'''
|'''Description'''
|-
|id
| string
|Yes
|"<TIMESTAMP>"
|Unique request identifier. The same value is returned in the response.
|-
|origin
| string
|No
|"APP"
|Identifies the sender of the request, for example '''APP''' , '''NodeRED''' , '''CLI''' , or
'''TestClient'''.
|-
|task
|object
|Yes
|{...}
|Main command object containing the command alias and parameters.
|-
|task.alias
|string
|Yes
|"SDO_WRITE"
|Defines the command to execute. For this operation, it must be
'''SDO_WRITE'''.
|-
|task.taskParams
|object
|Yes
|{...}
|Contains the SDO write parameters.
|-
|task.taskParams.node_id
|integer
|Yes*
|5
|Numeric CANopen node ID to write to.
|-
|task.taskParams.nodeId
|integer
|Yes*
|5
|Alternative spelling for '''node_id'''.
|-
|task.taskParams.node
|string
|Yes*
|"motor_1"
|Logical node name previously configured with '''CONFIG_CANOPEN.'''
|-
|task.taskParams.index
|integer/string
|Yes
|"0x6003"
|CANopen object dictionary index to write. Hex strings such as "'''0x6003'''"
are supported.
|-
|task.taskParams.subindex
|integer/string
|No
|"0x00"
|CANopen object dictionary subindex to write. If omitted, defaults to '''0'''.
|-
|task.taskParams.value
|integer/string
|Yes
|0
|Value to write into the selected object dictionary entry. Hex strings are
also supported.
|-
|task.taskParams.size
|integer
|No
|4
|Number of bytes to write. Valid values are normally '''1''' , '''2''' , '''3''' , or '''4''' . If
omitted, defaults to '''4'''.
|-
|task.taskParams.timeout
|number
|No
|2.0
|Timeout, in seconds, used for the SDO write operation. If omitted, the
actor default SDO timeout is used.
|}
* '''Response Parameters'''


=== 25. Included Software Stack ===
=== 25. Included Software Stack ===