I have two threads in my programm that use FlexMotion API. One thread is responsible for monitoring the digital ports and current axes position. In this thread I call flex_read_limit_status_rtn, flex_read_home_input_status_rtn, flex_read_vs_pos_rtn and flex_read_port_rtn. The second thread do motion control (blend, wait for blend complete ...). After a random period of time and, in many cases, after a succefull motion control, I get NIMC_noReturnDataBufferError (-70003) error from my first thread without the other thread doing any kind of motion control. I got an answer that FlexMotion API is thread-safe in MFC, so I'm not using any kind of locking mechanism before calling FlexMotion functions in the threads. Reading the error description
didn't help me to pinpoint the cause. Why I'm getting this error ?