![]() |
NexMotion
1.4.0
Open Robots & Machines [WIP]
|
Device Open up and Shut Down. More...
![]() |
Functions | |
RTN_ERR FNTYPE | NMC_DeviceOpenUp (I32_T DevType, I32_T DevIndex, I32_T *PRetDevID) |
Open up the device (Blocking call). More... | |
RTN_ERR FNTYPE | NMC_DeviceShutdown (I32_T DevID) |
Shut down the device (Blocking call). More... | |
RTN_ERR FNTYPE | NMC_DeviceOpenUpRequest (I32_T DevType, I32_T DevIndex) |
Request the device open up (Non-blocking call). More... | |
RTN_ERR FNTYPE | NMC_DeviceWaitOpenUpRequest (U32_T WaitMs, I32_T *PRetDevID) |
Wait for device open up (Blocking call). More... | |
RTN_ERR FNTYPE | NMC_DeviceShutdownRequest (I32_T DevID) |
Request the device shut down (Non-blocking call). More... | |
RTN_ERR FNTYPE | NMC_DeviceWaitShutdownRequest (I32_T DevID, U32_T WaitMs) |
Wait for device shut down (Blocking call). More... | |
Device Open up and Shut Down.
Open up the device (Blocking call).
DevType | The specified device type. 0: Simulator, 1: EtherCAT | |
DevIndex | The specified index of device which is set to 0 | |
[out] | PRetDevID | [Output] The device ID (DevID) after the function is called successfully |
Usage:
NMC_DeviceOpenUp() can be called to control a device before the other control APIs are called. The function is a blocking call. It costs a short time to process the initialization, including the loading of configuration file, and returns after the device is in the operation state.
Refence:
NMC_DeviceShutdown()
Request the device open up (Non-blocking call).
DevType | The specified device type |
DevIndex | The specified index of device which is set to 0 |
Usage:
The function will return immediately after called. NMC_DeviceWaitOpenUpRequest() or NMC_DeviceGetState() shall be used to read the device state, in order to check if the device is in the operation state.
Reference:
NMC_DeviceWaitOpenUpRequest()
Shut down the device (Blocking call).
DevID | The device ID of the machine that request to be shutdown. |
Usage:
After the application is closed, the function shall be called to shut down the device and release system resources. After called, the function will block the application until the application is closed.
Reference:
NMC_DeviceOpenUp()
Request the device shut down (Non-blocking call).
DevID | The device ID of the machine that request to be shutdown. |
Wait for device open up (Blocking call).
WaitMs | Waiting time for device open up (unit: ms). It can be set to the NMC_WAIT_TIME_INFINITE (0xFFFFFFFF) to wait for the completion of open up. | |
[out] | PRetDevID | [Output] The device ID (DevID) after the function is called successfully. |
Usage:
Generally, the function is used to check if the device open up is successful, and called after NMC_DeviceOpenUpRequest(). After called, the function will block the application until the device is in the operation or error state.
Reference:
NMC_DeviceOpenUpRequest()
Wait for device shut down (Blocking call).
DevID | The device ID of the machine that request to be shutdown. |
WaitMs | Waiting time for device open up (unit: ms). It can be set to the NMC_WAIT_TIME_INFINITE (0xFFFFFFFF) to wait for the completion of open up. |
Usage:
Generally, the function is used to check if the device shut down is successful, and called after NMC_DeviceShutdownRequest(). After called, the function will block the application until the device is in the operation or error state.
Reference:
NMC_DeviceShutdownRequest()