Project

General

Profile

6.3. 8SMC1-USBhF software compatibility

New motor controllers can be used with the software written for the 8SMC1-USBhF series. There are two options available to control new motor controllers using 8SMC1-USBhF-compatible software:
1. Recommended. Use MicroSMC software with support for both 8SMC1-USBhF and new motor controllers. In this case MicroSMC process will open all found motor controllers in exclusive mode to arbitrate access and it will be possible to control them through USMCDLL, which uses MicroSMC.
Download MicroSMC with support for new motor controllers on the Software page.
2. Use USMCDLL/libximc compatibility library to control motor controllers without MicroSMC software. Use this option if you need to simultaneously run MicroSMC and work with some motor controllers using libximc library.
Download USMCDLL/libximc compatibility library here.

The table below shows the mapping from 8SMC1-USBhF to new motor controller functions: first column lists USMCDLL library functions, second column lists corresponding paragraph in 8SMC1-USBhF controller user's manual, third column contains this function features in the migration library.

Function call 8SMC1-USBhF New motor controller
USMC_Init 7.5.3 Uses libximc enumerate_devices, get_enumerate_device_information, get_enumerate_device_serial, get_device_count, get_device_name, open_device functions. Queries all COM-ports present in the system.
USMC_GetState 7.5.4 Uses libximc get_status and get_engine_settings functions. AReset, EMReset, RotTrErr flags in USMC_State structure are always set to false.
USMC_SaveParametersToFlash 7.5.5 Uses libximc command_save_settings function.
USMC_GetMode 7.5.6 Uses libximc get_edges_settings, get_power_settings, get_control_settings, get_ctp_settings, get_sync_out_settings functions. EMReset, ResetRT, SyncOUTR, EncoderEn, EncoderInv, ResBEnc, ResEnc flags in USMC_Mode are always set to false, SyncINOp flag is always set to true.
USMC_SetMode 7.5.7 Uses all functions used by USMC_GetMode and their "set_" equivalents. Ignores RotTeEn, RotTrOp, ResetRT, SyncOUTR, SyncINOp, EncoderEn flags.
USMC_GetParameters 7.5.8 Uses libximc get_secure_settings, get_engine_settings, get_move_settings, get_feedback_settings, get_power_settings, get_control_settings, get_ctp_settings, get_home_settings, get_sync_out_settings functions. Returns zeroes in BTimeoutR, BTimeoutD, MinP, MaxLoft, StartPos fields.
USMC_SetParameters 7.5.9 Uses all functions used by USMC_GetParameters and their "set_" equivalents. Ignores BTimeoutR, BTimeoutD, MinP, MaxLoft, StartPos parameters.
USMC_GetStartParameters 7.5.10 Uses libximc get_move_settings, get_engine_settings functions. WSyncIN, SyncOUTR, ForceLoft flags in USMC_StartParameters structure are always set to false.
USMC_Start 7.5.11 Uses libximc get_move_settings, get_engine_settings, set_move_settings, set_engine_settings, command_move functions.
USMC_Stop 7.5.12 Uses libximc command_stop function.
USMC_SetCurrentPosition 7.5.13 Uses libximc set_position function.
USMC_GetEncoderState 7.5.14 Uses libximc get_status function.
USMC_GetLastErr 7.5.15 Does not modify its arguments. Error status is indicated by the nonzero return code of the corresponding USMC_ function.
USMC_Close 7.5.16 Uses libximc close_device function.

Migration library does not require and does not interact with background MicroSMC.exe process. It uses libximc.dll library to interface with new motor controllers.
All composite USMC_ functions containing several libximc function calls terminate if any of the underlying libximc functions returns an error. In this case controller may be left with partially saved settings. Nonzero return code of USMC_ functions is equal to the return code of the libximc function which returned an error.

Application example: usmcdll_libximc_test.zip

Add picture from clipboard (Maximum size: 977 MB)