EasyManuals Logo

Moog SmartMotor User Manual

Moog SmartMotor
909 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #691 background imageLoading...
Page #691 background image
Part 2: Commands
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 691 of 909
EXAMPLE:
a=SAMP 'Assign sample rate to variable a.
PRINT("The current sample rate is: ",a) 'Print info to terminal.
END
Program output is:
The current sample rate is: 8000
EXAMPLE: (Scale Factor Multipliers)
' SAMP: motor sample time in samples per second
' RES: encoder resolution in counts per rev
' 65536: internal fractional constant for motor unit calculations
' 60: conversion between seconds and minutes
' *1.0: way to typecast integer values out to full floating-point values
' af[2] thru af[7]: 32-bit, floating-point array variables
'These abbreviations are used in the following code:
' NatAD (Native Accel{decel})
' NatVel (Native Velocity)
' RPM (revolutions per minute)
' RPS (revolutions per second)
'Calculating multipliers 'Input Output
af[2]=(((SAMP*1.0)/RES)*60)/65536 'NatVel -> RPM Multiplier
af[3]=(((RES*1.0)/SAMP)/60)*65536 'RPM -> NatVel Multiplier
af[4]=((SAMP*1.0)/RES)/65536 'NatVel -> RPS Multiplier
af[5]=((RES*1.0)/SAMP)*65536 'RPS -> NatVel Multiplier
af[6]=af[5]/SAMP 'RPS^2 -> NatAD Multiplier
af[7]=af[4]*SAMP 'NatAD -> RPS^2 Multiplier
'Examples
'Suppose you wish to set a Velocity of 3000 RPM:
'(This method simply uses the above multiplier)
VT=3000*af[3] '3000 RPM desired speed multiplied by af[3]
'(RPM to Native Velocity multiplier)
'Suppose you wish to read real time velocity in units of RPS:
s=VA*af[5] 'Converts native VA (actual velocity) into RPS
'and assigns it to the variable "s"
END
RELATED COMMANDS:
R
FW Firmware Version (see page 454)
R
RES Resolution (see page 670)
Part 2: Commands: SAMP

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Moog SmartMotor and is the answer not in the manual?

Moog SmartMotor Specifications

General IconGeneral
BrandMoog
ModelSmartMotor
CategoryServo Drives
LanguageEnglish

Related product manuals