.

meiSqNodeDriveMonitor

Declaration

 
long meiSqNodeDriveMonitor(MEISqNode             node,
                           long                  driveIndex, /* relative to 
                                                             the node */
                           MEISqNodeMonitorValue *value);
  Required Header: stdmei.h

Description

meiSqNodeDriveMonitor reads the monitor fields from the drive and writes them into the structure pointed to by value.

 
node a handle to a SynqNet node object.
driveIndex an index to the drive (0, 1, 2, etc), relative to the node.
*value pointer to a structure of monitor values
   
 
Return Values
MPIMessageOK  

Sample Code


/* This function configure monitorA to look at index 10 on the drive
and display the monitorA value after. For Kollmorgen CD drive, index 10
shows the actual torque on the drive */

void driveCurrentMonitor(MEISqNode sqNode)
{
   MEISqNodeDriveMonitorConfig  monitorConfig; 
   MEISqNodeMonitorValue        value;
   long                         returnValue;

   /* Always do a ConfigGet before a ConfigSet */
   returnValue = meiSqNodeDriveMonitorConfigGet(sqNode,
                                                0, /* driveIndex */
                                                &monitorConfig);
   msgCHECK(returnValue);

   /* Configure monitorA to look at index 10 */
   monitorConfig.monitorA.data.index = 10;
   monitorConfig.monitorA.type       = MEISqNodeDriveMonitorDataTypeINDEX;

   returnValue = meiSqNodeDriveMonitorConfigSet(sqNode, 
                                                0, /* driveIndex */
                                                &monitorConfig);
   msgCHECK(returnValue);

   /* Get all monitor (A, B and C) values */
   returnValue = meiSqNodeDriveMonitor(sqNode, 
                                       0, /* driveIndex */
                                       &value);
   msgCHECK(returnValue);

   /* Print monitorA value */
   printf("MonitorValueA: %ld\n", value.monitor[MEISqNodeMonitorValueIndexA]);
}

See Also

MEISqNodeMonitorValue

 

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