background image

4 Protocol description

4 Protocol description

This chapter lists all commands supported by the adapter protocol. You can send the commands via the
COM port (e.g. using a terminal program).

The protocol is based on the specification CiA 309: Access from other networks - Part 3: ASCII mapping.

All commands are confirmed. You may start each command with a sequence number (UNSIGNED32), which
is then included in the response.

Example

// Request: Get name info, sequence=[1234]

[1234] info name

// Response: product name

[1234] name: ZK-USB-CAN-1

The token [net] is allowed to follow the [sequence] due to compatibility reasons, but it is ignored by the
adapter.

4.1 Configuration and initialization

4.1.1 Get Device Information: version, state, ticks, name

You use this command to read out the product information and e.g. carry out initial testing of the connection.

1. Version info

Syntax: 

"info version"

You use this command to request the version of the CANopen gateway server.

Example

// Request: Get version info

info version

// Response:

620 690 2110.0 352977019 0 00.00 00.00

620: Vendor ID

690: Product Code

2110.0: Firmware Version, Year 2021, Week 10

352977019: Serial Number

2. State info

Request state of the CAN bus state.
Syntax: 

"info state"

You use this command to query the state of the CAN bus.

Example

// Request: Get baudrate state info

info state

// Response: -1 if not initialized, >=0 -> baudrate; 0 = 1000kB

state:0

3. Ticks info

Syntax: 

"info tick"

Version: 1.0.0

10

Содержание ZK-USB-CAN-1

Страница 1: ...Operating Instructions ZK USB CAN 1 Operating Instructions Version 1 0 0...

Страница 2: ...safety 4 1 7 Numerical values 4 2 Technical details and pin assignment 5 2 1 Dimensioned drawings and installation options 5 2 2 Environmental conditions 6 2 3 Electrical properties and technical data...

Страница 3: ...Windows 98 NT ME 2000 XP 7 10 are registered trademarks of the Microsoft Corporation 1 3 Intended use ZK USB CAN 1 is used as a component of drive systems in various industrial applications where a co...

Страница 4: ...Development engineers Installers service personnel Application engineers Only specialists may install and commission the product Specialist staff are persons who have appropriate training and experien...

Страница 5: ...ings and installation options All dimensions are in millimeters You can secure the adapter using one to three M4 screws Three M4x6 threaded holes are provided for this purpose 32 5 10 10 Alternatively...

Страница 6: ...minute CAN baud rate up to 1000 KBaud 2 4 LED signaling When USB is initialized the USB status LED lights up green and the device is ready for operation If communication is taking place the LED flashe...

Страница 7: ...V 1 5 4 G 3 5 Mating connector included in scope of delivery Phoenix Contact FMC 1 5 4 ST 3 5 or equivalent Pin 1 is marked with a 1 Pin Function Note 1 CAN_GND CAN Ground 2 CAN_L CAN Low 3 CAN_SHLD C...

Страница 8: ...2 Technical details and pin assignment USB connection Type USB 2 0 type B connector A suitable USB cable is included in scope of delivery Version 1 0 0 8...

Страница 9: ...ct the adapter to the PC via USB The driver is installed automatically and the device bus is detected as a COM port 2 To find the number of the assigned COM port a Click the search icon in the task ba...

Страница 10: ...ignored by the adapter 4 1 Configuration and initialization 4 1 1 Get Device Information version state ticks name You use this command to read out the product information and e g carry out initial te...

Страница 11: ...e Version Syntax 0 r 0x1009 0 vs Example Read adapter hardware version NodeId 0 Index 0x1009 Subindex 0 Data Type visual string 0 r 0x1009 0 vs SDO Read Response hardware version W003 W003 4 1 3 Read...

Страница 12: ...alue or as a table index of the standard CANopen table Index Baud rate 1 Stop Bus 0 1000 1 800 2 500 3 250 4 125 5 100 6 50 7 20 8 10 NOTE Autobaud is not supported Example Request Initialize CAN Baud...

Страница 13: ...K OK 4 1 7 Start node NMT Syntax sequence net node start You use this command to switch the CAN network to the Operational state in which PDO transfer takes place Example Request Send Start operationa...

Страница 14: ...eop erational You use this command to switch the CAN network to the Pre Operational state in which you can change the PDO mapping Example Request Set NodeId 1 to pre operational 1 preop Response OK OK...

Страница 15: ...ormat 1 All return strings are hex values 0x00000601 8 0x40 0x63 0x20 0x00 0x00 0x00 0x00 0x00 0x00000581 8 0x43 0x63 0x20 0x00 0x01 0x00 0x00 0x00 Example Request Set the format of message to 0 set m...

Страница 16: ...for ID comparison The bits of the filter ID are directly compared with the bits of the ID of the incoming message Example Request set filter_id0 0x581 Response OK OK 3 Command for setting Filter Mask...

Страница 17: ...st Set notification 0 set notification 0 Response OK OK 4 1 16 Command for CAN Error list Syntax info CAN_ERR Returns a message in the CAN_ERR format REC TEC LEC BOFF EPVF EWGF Where REC Error counter...

Страница 18: ...quotes vs Escape sequences are also supported inside Escape Sequence Format Backslash character Single Quotation Mark character Double Quotation Mark character Question Mark character You can also use...

Страница 19: ...d rl Initiate upload SDO command for large data Syntax sequence net node rl multiplexer This command is used for reading large quantities of data and is directly linked to the NEXT command for further...

Страница 20: ...ite CAN message Syntax sequence net wm cobid dataLength value1 value8 Example Request CobId 0x00 wm 0 2 2 0 Response OK OK Incoming CAN Message with CobId 0x701 Data Length 1 Data 0x4 701 1 4 4 2 10 C...

Страница 21: ...300 and 301 are returned in this format Example Request Send wrong command wrong command Response ERROR with error code 101 ERROR 101 Internal errors Error code dec Error message 100 Request not suppo...

Страница 22: ...f memory 0601 0000 Unsupported access to an object 0601 0001 Attempt to read a write only object 0601 0002 Attempt to write a read only object 0602 0000 Object does not exist in the object dictionary...

Отзывы: