.

meiSqNodeInfo

Declaration

 
long meiSqNodeInfo(MEISqNode       node,
                   MEISqNodeInfo   *info); 
  Required Header: stdmei.h

Description

meiSqNodeInfo reads a SynqNet node's information and writes it into a structure pointed to by info. The info structure contains read only data about the node.

The RMB-10V, RMB-10V2 and some Trust nodes support analog inputs. MPI support has been added to support the reading of node-based analog inputs. The number of analog inputs a node supports can be determined with meiSqNodeInfo(...). An analog input value can be read with meiSqNodeAnalogIn(...). The analog to digital converted value is scaled from -1.0 to +1.0, where +1.0 is a full-scale positive voltage. The input range of the ADC is hardware-specific.

 
node a handle to a SynqNet node object.
*info a pointer to a drive specific information structure.
   
 
Return Values
MPIMessageOK  
MPIMessageARG_INVALID  
MEISqNodeMessageRESPONSE_TIMEOUT This error tell you that the node that you are trying to get info from is not responding in the expected amount of time. It is possible that this error is caused by the node losing communication to the SynqNet network.

Sample Code



MEISqNodeInfo sqNodeInfo;
meiSqNodeInfo( sqNode0, &sqNodeInfo ); long x = sqNodeInfo.io.digitalInputCount;

Sample Code


/*
This function shows how to get the status of a Node, and read the Packet Errors with the node passed into the function,
then print to the console.
*/
long getNodeStatus(MEISqNode sqNode)
{ MEISqNodeStatus nodeStatus;
long returnValue;
long intErrUp;
long intErrDn;
returnValue = meiSqNodeStatus(sqNode, &nodeStatus); if(returnValue == MPIMessageOK){
intErrUp = nodeStatus.upStreamError.count;
intErrDn = nodeStatus.downStreamError.count;
printf("Node Errors Up: %u, Node Errors Down: %u\n", intErrUp, intErrDn);
} return returnValue;
}

See Also

meiSqNodeDriveInfo | meiSqNodeConfigGet | meiSqNodeDriveConfigGet

 

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