Overview
The main statuses can be read with the GetStatus function.
Statuses for the entire system are explained in System Status.
Statuses of each axis are explained in Axis Status.
Both of the above types of statuses are read when the GetStatus function is called.
Other specialized statuses are read by other API functions. For example, several specialized homing related statuses are obtained with the GetHomeData function.
I/O data is read with the Get- functions in the Io class. User memory data is read with the Get- functions in the UserMemory class.
Status Update Timing
When the GetStatus function is called, the status is retrieved from a snapshot taken at the end of the last communication cycle. This snapshot remains in the buffer for at least 3 communication cycles after the GetStatus function is called, providing enough time to copy the data. As long as the GetStatus copies the data without any interruption, the entire status structure that is read is guaranteed to be from the same communication cycle.
However, some statuses update more frequently than the snapshots at the end of each communication cycle. The Update Timing values in the table of statuses specify the timing at which the status is updated.
Cyclic statuses update at the end of each communication cycle when the snapshot is taken.
Acyclic statuses update at the end of each communication cycle, but in addition to that, they also update whenever a function that affects this status is called.
For example, the Op State status is listed as Acyclic. When the StartPos function is called, the GetStatus function can be called immediately after it and the Op State will be guaranteed to return Pos (unless the position command is completed or aborted in the time between calling StartPos and calling GetStatus).
If the API Wait Until Motion Start parameter is enabled for an axis (this parameter is enabled by default), motion functions for that axis will not return until after the end of the communication cycle that the motion begins. When the motion function returns, Cyclic statuses would have already updated based on the first cycle of motion. Therefore, the GetStatus function can be called immediately after a motion function returns and still be guaranteed to contain Cyclic statuses that are updated based on the commanded motion. See Function Calls That Are Blocking for the list of motion functions that are affected by the API Wait Until Motion Start parameter.
Tutorials
The tutorial at Tutorial 1-7: Reading the status and executing motion contains an example of how to obtain the status.