Chapter 10: the os interpreter, Chapter 10: the os interpreter -1 – ElmoMC CANopen DS 301 Implementation Guide User Manual

Page 49

Advertising
background image

Chapter 10: The OS Interpreter

The OS interpreter is used to process any SimplIQ interpreter string command, and to
return the string results. The only limitation in its use is that the returned strings cannot
exceed 500 characters in length, a limit that must be considered when uploading recorded
data. A more efficient — and unlimited — method to upload recorder data is to use
object 0x2030.

To issue an OS interpreter command
1. Set OS mode to evaluate the string immediately, by writing 0 to object 0x1024.
2. Write the command string to object 0x1023, sub-index 1.

The command execution can be resolved by an event-driven PDO (object 0x2F20) or by
polling object 0x1023, sub-index 2. The polling may return:
ƒ

0xFF: Command still executing (can be aborted by writing 3 to object 0x1024).

ƒ

0x1: Command successfully executed. Result is waiting for read.

ƒ

0x3: Command rejected. Error code waiting for read.

When the response is ready, it can be read from object 0x1023, sub-index 3.

Example:
The following describes the use of the OS interpreter to send the command PX=1234.

Client initiates OS Evaluate Immediately mode:
RSDO

Object

0x1024

23 24 10 00 00 00 00 00

Server replies:
TSDO

Object

0x1024

60 24 10 00 00 00 00 00


Client initiates segmented SDO download:
RSDO Object

0x1023

Sub-index

21 23 10 01 00 00 00 00

Server replies:
TSDO Object

0x1023

Sub-index

60 23 10 01 00 00 00 00


Client sends PX=1234 in one SDO:
RSDO

P X = 1 2

3 4

01 50 58 3D

31 32 33 34


CANopen DS 301 Implementation Guide

The OS Prompt Interpreter

MAN-CAN301IG (Ver. 2.1)

10-1

Advertising