.

MEISynqNetTiming

Definition

 
typedef struct MEISynqNetTiming {
    double controllerFreq;      /* kHz */
    double controllerPeriod;    /* uS  */

    long   txTime;              /*  %  */
    double calculationLimit;    /* uS  */
    double calculationTime;     /* uS  */
double calculationSlack; /* uS */ long bandwidthUsage; /* % */ struct { double synq; /* uS - synq packet + spacing */ double demand; /* uS - sum demand packets + spacing */ double control; /* uS - sum control packets + spacing */ double total; /* uS */ } downstream; struct { double feedback; /* uS - sum feedback packets + spacing */ double status; /* uS - sum status packets + spacing */ double total; /* uS */ } upstream; struct { double updateFreq; /* uS */ double updatePeriod; /* uS */ double demandLatency; /* uS */ double feedbackLatency; /* uS */ double latencyOverhead; /* uS */ double controlLatency; /* uS */ double discoveryLatencyTolerance; /* +/- uS per network discovery */ } node[MEISynqNetMaxNODE_COUNT]; } MEISynqNetTiming;
 
Change History: Modified in the 03.04.00. 

Description

MEISynqNetTiming contains static data that is determined during network initialization. It identifies timing statistics about the current network. Most values are just reported based on network timing calculations. The values that can be configured by the MPI are stated below as configurable.

 
controllerFreq

The sample rate calculation of the SynqNet controller board, in kHz. It is also the rate at which SynqNet packets are sent. The controllerFreq must be configured so that the driveUpdateFreq is an integer multiple of the controllerFreq.

This value is configurable. See MPIControlConfig.

controllerPeriod

The sample period calculation of the SynqNet controller board, in uS. Derived from controllerFreq.

txTime

The scheduled time for SynqNet packets to be sent, in % (of the controllerPeriod). Defaults to 75%. Must be set to a value greater than the foreground calculation time, and less than 100%.

This value is configurable. See MEIControlConfig.

calculationLimit

The maximum allowed foreground calculation time, in uS. Derived from txTime * controllerPeriod.

calculationTime

The foreground calculation time of the controller, in uS.

calculationSlack

The available slack time between the foreground calculation time, and the scheduled txTime, in uS.

bandwidthUsage

The amount of SynqNet bandwidth used, in %, for this SynqNet configuration. The actual packet payload configured is divided by the maximum available SynqNet bandwidth, for both upstream and downstream packets. The greater of the two is reported.

downstream

Total downstream (controller to nodes) packet payload, in uS. Includes spacing between packets. Breaks down into the following three packet types.

downstream.synq

Downstream SYNQ packet payload, in uS. Includes spacing between packets.

downstream.demand

Downstream DEMAND packet payload, in uS. Includes spacing between packets.

downstream.control

Downstream CONTROL packet payload, in uS. Includes spacing between packets.

upstream

Total upstream (nodes to controller) packet payload, in uS. Includes spacing between packets. Breaks down into the following two packet types.

upstream.feedback

Upstream FEEDBACK packet payload, in uS. Includes spacing between packets.

upstream.status

Upstream STATUS packet payload, in uS. Includes spacing between packets.

node.updateFreq

The cyclic communication rate of a drive processor on a SynqNet node, in kHz. Typically fixed to 16 kHz, but may vary depending on drive type. May be configurable on some drives. This rate often matches the drive PWM rate. Analog drives that do not have drive processors and thus have no scheduled updates, do not have update frequencies and will report 0.

node.updatePeriod

The cyclic communication period of a drive processor on a SynqNet node, in uS. Derived from driveUpdateFreq. Analog drives that do not have drive processors and thus have no scheduled updates, do not have update frequencies and will report 0.

node.demandLatency

The time to send SynqNet demand data downstream from controller to nodes, in uS. Does not include drive demand delays.

node.feedbackLatency

The time to send SynqNet feedback data upstream from nodes to controller, in uS. Rounded up to make the total SynqNet latency an integer multiple of the driveUpdatePeriod. Does not include drive feedback delays.

node.latencyOverhead

 

 

node.controlLatency

The overall SynqNet system control latency, in uS. Always rounded up to an integer multiple of driveUpdatePeriod. Control latency begins when position feedback is sampled on the node, includes upstream packet delays, controller foreground calculation, downstream packet delays, and ends when demands are strobed on the nodes. Note drive feedback and demand delays are NOT included. Control latency can be broken down into the four components listed below: feedbackLatency, calculationTime, calculationSlack, and demandLatency.

node.discoveryLatencyTolerance

 

 

Sample Code


/*
This function allows you to calculate how much of your SynqNet cycle you are actually using. The Foreground Cycle is reading values from all the nodes, where the TX (transmit) is sending data to nodes, and commanding motion. The larger the TX Start means that the Transmiting is happening later in the SynqNet Cycle (increasing latency between reading values, and interpreting them). However it is crucial that the TX Cycle Start NEVER is lower than the Foreground Cycle legnth. Always leave a Buffer. */
long synqNetTimingStatistics(MPIControl control, MEISynqNet synqNet)
{ MEISynqNetTiming timingValues;
long returnValue; // Grab Timing Data & Calculate Positions
returnValue = meiControlStatisticsReset(meiObjects->MpiControl());
if(returnValue != MPIMessageOK){
return returnValue;
} returnValue = meiSynqNetTiming(meiObjects->MpiSynqNet(), &timingValues); if(returnValue != MPIMessageOK){
return returnValue;
} printf("Foreground Cycle Usage: %3.2lf%%\n", timingValues.calculationTime/SQcontrollerPeriod*100); printf("TX Start @ Cycle Percent: %3.2lf%%\n", timingValues.txTime);
printf("TX Cycle Usage: %3.2lf%%\n", timingValues.downstream.total/timingValues.controllerPeriod*100); return returnValue;
}

See Also

SynqNet Timing Values

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering