AMS DCB-274 manual Set Origin, Program Mode

Page 53

ADVANCED MICRO SYSTEMS, INC.

SMC-27X2 SOFTWARE

 

 

 

 

 

 

Command

Function

 

Type

 

NV Bytes

O

Set Origin

 

Immediate, Program

4

 

 

 

 

 

Mnemonic

Data 1

Data 2

Result

 

 

(Name) O

Position (±8,388,607)

None

None

O (Set Origin)

This command sets the internal 24-bit position counter to the specified value. Zero position for the RELATIVE mode is “0000.” Signed numbers are used. Hardware reset clears to “0000.” The position counter is incremented or decremented for all motion commands. During any index the position counter is used only for trip value comparison. This counter may be changed without affecting the distance of travel in process.

This command may be implemented within a program. It is very useful when used in conjunction with the

Find Home and Relative Positioning commands. Following, is an example:

 

P 0

 

Enter program mode.

 

 

 

 

F 1000 1 Find the Home switch in the “1” direction at a step rate of 1000 SPS.

 

O

 

Set origin and counter to 0.

 

 

R 1000

Move to position 1000 relative to 0.

 

 

P

 

Exit program mode.

 

 

 

 

 

 

 

 

 

 

 

Command

Function

 

Type

 

NV Bytes

P

Program Mode On/Off

 

Immediate

 

N/A

 

 

 

 

 

 

 

Mnemonic

 

Data 1

Data 2

Result

 

 

 

(Name) P (a)

 

Address (0-2047)

None

None, #

P (Program Mode)

The P command is always used in pairs. The first “P” initiates the program mode at the specified address. Once in this mode all commands and data are directed into the NV memory for future execution. Entering the second “P” command will terminate the PROGRAM mode, and then insert an end of program marker (0FFh) in the stored program. The controller will then return to the COMMAND mode.

The program mode may also be terminated with the ESCape character, causing immediate return to the COMMAND mode without inserting the end of program marker. This is useful for editing sections of the program, without requiring that all commands be re -entered.

More than one program may exist at different addresses. These commands can than be executed via the “G (address)” command. There are special address ranges that are assigned to various functions:

Address

Function

 

 

128-191

Fast “shadow” RAM

256-511

“G 2048” command

1600

Power-up routines

4 7

Image 53
Contents Nashua, NH Page Revision Date 07/05/06 Page Advanced Micro SYSTEMS, INC Addenum Limitations or Exceptions for the DCB-274 IntroductionProduct Overview FeaturesSIN-8 Required Hardware for OperationOut of the Box Quick Start Dual Ammeter Circuit After Sign-onConnect the Motor Serial Interface J2, J3 Connections J1, J4 Advanced Micro SYSTEMS, INC HardwareInput Ports Pin 7 VIO Reference InputStandard Mode- Sinking Inputs PLC Mode- Sourcing InputsOutput Ports Typical User Input CircuitTypical Output Circuit Encoder Input Option J1Port Encoder Inputs J1 Power Supply and Motor Connection J5Step and Direction Inputs J1 Baud Rate Jumpers B1, B2 Typical Wiring Diagrams for Step MotorsElectrical SpecificationsEnvironmental PhysicalPhysical Dimensions RS-232 Hardware OverviewRS-232 RS-422RS-232 Daisy Chain connection Single axis, RS-232 connection using AMS SIN-7 adapterRS-422 Party Line Hardware Cable SpecificationsParty Line Connect RS-422 Party LineSIN-8, RS-232 to RS-422 converter SIN-8 Serial AdapterRS-422/485 BUS-drop SIN-10, intelligent serial line converter Other Party Line SignalsSIN-10 Intelligent Serial Adapter Daisy Chain Mode not recommended for more than 1 axis Party Line ModeSerial Communications Overview Serial Communications SoftwareBaud Rate Serial Interface Using EasiEasi Software Sign-OnExamine Command Axis Name Assignment Simple Command ExamplesDaisy Chain Start-Up Execute the Program NV Memory ProgrammingVerify the Program Some Rules Party Line and Daisy Chain Line CommandsEdit Program Party Line Startup Command ExampleAnatomy of Instruction Execution Command Cycle Examples Interrupt CommandsAdvanced Micro SYSTEMS, INC Serial Interface Advanced Micro SYSTEMS, INC Serial Interface Memory Map Non-Volatile Memory DetailsTurbo Ram Default Table@ Soft Stop Command Format DescriptionESC Global Abort Port Read/Write ResetInputs OutputsProgramming Example Lower case B Fast and Slow Decay Set Jog SpeedsDivide Speeds Clear and Restore NV MemoryFind Home Normally Open Home SwitchNormally Closed Home Switch Special case Go Initial Velocity Step ResolutionRamp Slope Lower case I Restart Special TripJump to Address a, n+1 times Lower case K Trip Output Value Advanced Micro SYSTEMS, INC SMC-27X2 Software Flags and Numbers Loop on Port Lower case L Option Flags Limit Polarity Flag PLC Mode FlagMake Step and Direction Outputs Flag Moving Output FlagGentle Limit Flag Move at a Constant VelocityPort 4 Input Flag Set Origin Program ModeIndex Relative to Origin Trip Point SaveSet Slew Speed Lower case W Pre-energize WaitHold and Run Current ExamineRead Position Read Limits, Hardware Read NV MemoryIndex in Minus Direction + Index in Plus Direction\ Write to NV Memory Read Moving StatusName Axis Selective TerminationAMS SIN-11 Serial Adapter Party Line ModeAdvanced Micro SYSTEMS, INC Addendum Command SummaryCtrl Char Dec Hex Code Ascii Character CodeAbout Step Motor Current Step Motor CharacteristicsDetermining the Current Value Motor ChoiceBasic 8 Wire Motor Amps and Wire Count and PowerWire Motor Decay Control Application Notes V1.10 Double Speed CharacteristicsSerial Adapter Summary