EasyManua.ls Logo

Standa 8SMC5-USB - Page 213

Standa 8SMC5-USB
345 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
and PC library.
result_nodevice. Error opening device, lost connection or failed synchronization. Device reopen and/or user action is required.
If a function returns an error values of all parameters it writes to are undefined. Error code may be accompanied by detailed error
description output to system log (Unix-like OS) or standard error (Windows-like OS).
Zero byte synchronization procedure
Synchronization is performed by means of sending zero ('\0') bytes and reading bytes until a zero byte is received. Optionally one may
clear port buffer at the end of synchronization procedure. Initially 64 zero bytes are sent. If there were no zero bytes received during
the timeout, then a string of 64 bytes is sent 3 more times. After 4 unsuccessful attempts and no zero bytes received device is
considered lost. In this case library should return result_nodevice error code. In case of successful syncronization library returns
result_error.
Controller settings setup
Functions for adjusting engine read/write almost all controller settings.
Command SFBS
result_t set_feedback_settings (device_t id, const feedback_settings_t* feedback_settings)
Command code (CMD): "sfbs" or 0x73626673.
Request: (18 bytes)
INT32U CMD Command
INT16U IPS
The number of encoder counts per shaft revolution. Range: 1..655535. The field is obsolete, it is
recommended to write 0 to IPS and use the extended CountsPerTurn field. You may need to update the
controller firmware to the latest version.
INT8U FeedbackType Type of feedback
0x01 - FEEDBACK_ENCODER (Feedback by encoder.)
0x03 - FEEDBACK_ENCODERHALL (Feedback by Hall detector.)
0x04 - FEEDBACK_EMF (Feedback by EMF.)
0x05 - FEEDBACK_NONE (Feedback is absent.)
INT8U FeedbackFlags Flags
0x01 - FEEDBACK_ENC_REVERSE (Reverse count of encoder.)
0x02 - FEEDBACK_HALL_REVERSE (Reverce count position on the Hall sensor.)
0xC0 - FEEDBACK_ENC_TYPE_BITS (Bits of the encoder type.)
0x00 - FEEDBACK_ENC_TYPE_AUTO (Auto detect encoder type.)
0x40 - FEEDBACK_ENC_TYPE_SINGLE_ENDED (Single ended encoder.)
0x80 - FEEDBACK_ENC_TYPE_DIFFERENTIAL (Differential encoder.)
INT16U HallSPR The number of hall steps per revolution.
INT8S HallShift
Phase shift between output signal on BLDC engine and hall sensor input(0 - when only active the Hall sensor,
the output state is a positive voltage on the winding A and a negative voltage on the winding B).
INT8U Reserved [5] Reserved (5 bytes)
INT16U CRC Checksum
Answer: (4 bytes)
INT32U CMD Command (answer)
Description:
Feedback settings.
Command GFBS
result_t get_feedback_settings (device_t id, feedback_settings_t* feedback_settings)
Command code (CMD): "gfbs" or 0x73626667.
Request: (4 bytes)
INT32U CMD Command
Page 213 / 345
Page 213 / 345