ApossC SDK  V01.15
SetupSignalGeneratorAxis.mc
#include <SysDef.mh>
#include "..\..\SDK\SDK_ApossC.mc"
#include "..\..\SDK\Encoder\SDK_SignalGenerator.mc"
#define AXIS 0 // Axis module number
#define ENCPORT_TX 0 // Encoder port number used for signal generator
#define ENCPORT_RX 1 // Encoder port number used for reception of the signal
#define INDEX_DISTANCE 10000
long startRecording(long axis);
long main(void)
{
ENCPORT_RX,
2000,
1, //digital input latch type
1, //digital input no
ENCPORT_TX,
INDEX_DISTANCE
);
Delay(1);
DefOrigin(AXIS);
startRecording(AXIS);
AxisControl(AXIS, ON);
AxisPosAbsStart(AXIS, 100000);
AxisWaitReached(AXIS);
Delay(100);
RecordStop(0, 0);
while(1)
{
Delay(500);
}
return(0);
}
long startRecording(long axis)
{
//set up oscilloscope
RecordTime(1);
RecordDest(DYNMEM);
RecordIndex(AXE_PROCESS_INDEX(axis, REG_ACTPOS),
RecordType(0);
RecordStart(0);
}
sdkSigGenAxisSetupMiniMACS6
long sdkSigGenAxisSetupMiniMACS6(long axis, long encPortOut, long indexDistance)
Settings for a Signal Generator.
Definition: SDK_SignalGenerator.mc:41
REG_IAVEL
#define REG_IAVEL
Internal actual velocity.
Definition: SdoDictionary.mh:3273
HWLATCH_SLOPE_RISING
#define HWLATCH_SLOPE_RISING
Definition: SdoDictionary.mh:9197
sdkSetupIncEncoder
long sdkSetupIncEncoder(long axis, long encPort, long encRes, long latchType, long latchParam, long latchSlope)
Settings for an incremental encoder.
Definition: SDK_Encoder_Setup.mc:43
VIRTMAST_PROCESS_INDEX
#define VIRTMAST_PROCESS_INDEX(modno, parno)
Virtual Master Process Data: Getter.
Definition: SdoDictionary.mh:6107
sdkInfoPrintAxesPos
long sdkInfoPrintAxesPos()
Prints the position information of all axes.
Definition: SDK_Information_General.mc:78
REG_ACTPOS
#define REG_ACTPOS
Actual position value.
Definition: SdoDictionary.mh:3199
AXE_PROCESS_INDEX
#define AXE_PROCESS_INDEX(modno, parno)
Axis Process Data: Getter.
Definition: SdoDictionary.mh:3175
REG_ZERO
#define REG_ZERO
Last detected index position.
Definition: SdoDictionary.mh:3215
REG_COMPOS
#define REG_COMPOS
Set-point position value.
Definition: SdoDictionary.mh:3207
PO_VIRTMAST_VEL
#define PO_VIRTMAST_VEL
Output velocity in increments per line.
Definition: SdoDictionary.mh:6130

Data Sheets | Released Software | Software Manuals | Hardware Manuals | Maxon Shop

Maxon Support Center