.

meiSqNodeStatus

Declaration

 
long meiSqNodeStatus(MEISqNode          node,
                     MEISqNodeStatus    *status);
  Required Header: stdmei.h

Description

meiSqNodeStatus reads status from the node associated with the SynqNet object and writes it into the structure pointed to by status. The SynqNet node status structure contains error counters and event mask data.

NOTE: This data requires service commands to acces the data on the node. As a result, it may take up to 9 servo cycles to read the data. At the default sample rate of 2kHz, this would translate to 4.5ms.

 
node a handle to a SynqNet node object.
*status pointer to a SynqNet status structure.
   
 
Return Values
MPIMessageOK  
MPIMessageARG_INVALID  

Sample Code

/* getNodeUpStreamError(...) demonstrates how to read SqNode 
upstream errrors using function meiSqNodeStatus(...) and 
structure MEISqNodeStatus.
*/
long getNodeUpStreamError(MEISqNode   sqNode, 
                          long        *rate,
                          long        *count)
{
   long returnValue;
   MEISqNodeStatus sqNodeStatus;

   returnValue = 
      meiSqNodeStatus(sqNode, 
                      &sqNodeStatus);

   if(returnValue = MPIMessageOK)
   {
      *rate = sqNodeStatus.upStreamError.rate;
      *count = sqNodeStatus.upStreamError.count;
   }
   return returnValue;
}

See Also

meiSynqNetStatus | meiSqNodeInfo

 

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