.

meiSqNodeAnalogOutPtr

Declaration

 
long meiSqNodeAnalogOutPtr(MEISqNode   sqNode,
                           long        channel,
                           long        *mask,
long **ptr);
  Required Header: stdmei.h
Change History: Added in the 03.04.00.

Description

meiSqNodeAnalogOutPtr gets a controller memory pointer and mask of an analog output (channel on the SynqNet node sqNode) and writes them to the locations pointed to by ptr and mask. The memory pointer and mask obtained by this function can be used when setting up the data recorder or user limits.

Analog values are held as 16 bit words either in the upper or lower two bytes of a controllers memory location hence the mask obtained from this function will either be 0xFFFF0000 or 0x0000FFFF.

 
sqNode a handle to a SynqNet node object.
channel an index to a node's analog output channel.
*mask a pointer to a bitwise mask that corresponds to the specified word.
**ptr a pointer to a controller address that contains the analog output word.
   
 
Return Values
MPIMessageOK  
MPIMessageaARG_INVALID  

Sample Code

The sample code below shows how to set up the data recorder to record analog output channel 2 on node 1.

 

long mask;
long * pointer;
meiSqNodeAnalogOutPtr( sqNode1, 2, &mask, &pointer ); void * points[MEIXmpMaxRecSize];
points[0] = pointer;
long pointCount = 1;
mpiRecorderRecordConfig(
recorder,
MPIRecorderRecordTypePOINT,
pointCount,
points );

See Also

meiSqNodeDigitalInPtr
meiSqNodeDigitalOutPtr
meiSqNodeAnalogInPtr

MEIMotorEventConfig
mpiRecorderRecordConfig

 

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