APIs, concepts, guides, and more

◆ NetworkSyncGroupCountGet()

int32_t NetworkSyncGroupCountGet ( )
Description:
Returns the number of sync group slots populated by the master from the ENI at startup. Group 0 (the default group) always exists once the network is operational, so the count is at least 1; additional groups appear only when nodes were assigned a non-zero SyncGroup with RapidCodeNetworkNode::ConfigSet before the ENI was generated. See Sync Groups.
Sample Code:
for (int32_t groupId = 0; groupId < controller->NetworkSyncGroupCountGet(); groupId++)
{
MotionController::NetworkSyncGroupStatus status = controller->NetworkSyncGroupStatusGet(groupId);
printf("Group %u: state %d WKC %u/%u\n",
status.Id, (int)status.State, status.ActualWkc, status.ExpectedWkc);
}
Status of a single EtherCAT sync group.
Definition rsi.h:2320
RSINetworkSyncGroupState State
Current group state – see RSINetworkSyncGroupState for the meaning of each value.
Definition rsi.h:2322
uint32_t Id
Sync group id (0 = default group).
Definition rsi.h:2321
uint32_t ActualWkc
Most recent actual Working Counter. Less than ExpectedWkc while a group node is out of OP.
Definition rsi.h:2324
uint32_t ExpectedWkc
Expected Working Counter for this group's cyclic datagram.
Definition rsi.h:2323
Returns
(int32_t) The sync group count.
See also
NetworkSyncGroupStatus, NetworkSyncGroupStatusGet