| ApossC SDK V01.15

VirtualMaster_ProfileMode.mc
#include <SysDef.mh>
#include "..\..\SDK\SDK_ApossC.mc"
#define VIRTUAL_MASTER 0
#define VIRTUAL_AXIS 0
long main(void)
{
// Setup an virtual master in profile mode
sdkSetupVirtualMasterMode(VIRTUAL_MASTER, VIRTMAST_MODE_PROFILE);
// Setup an virtual axis for simulation
sdkSetupAxisSimulation(VIRTUAL_AXIS);
// Set the virtual master VIRTUAL_MASTER as master of VIRTUAL_AXIS
sdkSetupVirtualMasterAxisLink(VIRTUAL_MASTER, VIRTUAL_AXIS);
// The "inputs" are converted from increments to quadcounts.
sdkSetupVirtualMasterScale(VIRTUAL_MASTER,4,1);
// Set the profile of the virtual master
// Acc/ Dec = 10 qc / ms
sdkSetVirtualMasterProfile(VIRTUAL_MASTER, 10, 10);
// The axis must be on and ready for synchronisation
AxisControl(VIRTUAL_AXIS,ON);
SyncPos(VIRTUAL_AXIS);
// Start the virtual master with a velocity of 10
sdkStartVirtualMasterProfile(VIRTUAL_MASTER, 10);
while(1)
{
sdkInfoPrintAxesPos();
Delay(2000);
}
// Stops the virtual master -> Set velocity to zero
sdkStopVirtualMasterProfile(VIRTUAL_MASTER);
// Disable the virtual master module
sdkSetupVirtualMasterMode(VIRTUAL_MASTER, VIRTMAST_MODE_DISABLED);
return(0);
}
sdkSetupAxisSimulation
long sdkSetupAxisSimulation(long axis)
Start a simulated axis.
Definition: SDK_VirtualModule_AxisSetup.mc:22
sdkStopVirtualMasterProfile
long sdkStopVirtualMasterProfile(long master)
Stops a virtual master in profile mode.
Definition: SDK_VirtualModule_MasterSetup.mc:124
sdkSetupVirtualMasterScale
long sdkSetupVirtualMasterScale(long master, long numerator, long denominator)
Scale the input parameters of the virtual master.
Definition: SDK_VirtualModule_MasterSetup.mc:67
sdkInfoPrintAxesPos
long sdkInfoPrintAxesPos()
Prints the position information of all axes.
Definition: SDK_Information_General.mc:78
VIRTMAST_MODE_DISABLED
#define VIRTMAST_MODE_DISABLED
Definition: SdoDictionary.mh:4957
sdkSetVirtualMasterProfile
long sdkSetVirtualMasterProfile(long master, long acc, long dec)
Set a virtual master profile.
Definition: SDK_VirtualModule_MasterSetup.mc:88
sdkStartVirtualMasterProfile
long sdkStartVirtualMasterProfile(long master, long vel)
Starts a virtual master in profile mode.
Definition: SDK_VirtualModule_MasterSetup.mc:108
VIRTMAST_MODE_PROFILE
#define VIRTMAST_MODE_PROFILE
Definition: SdoDictionary.mh:4959
sdkSetupVirtualMasterMode
long sdkSetupVirtualMasterMode(long master, long mode)
Setup a virtual master.
Definition: SDK_VirtualModule_MasterSetup.mc:28
sdkSetupVirtualMasterAxisLink
long sdkSetupVirtualMasterAxisLink(long master, long axis)
Set the virtual master as master of an axis.
Definition: SDK_VirtualModule_MasterSetup.mc:45

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

Maxon Support Center