Baldor mn1854 manual Gosub Syntax GSi and GSname, =1-400, name = any legal program name

Page 67

GS

Gosub

syntax – GSi and GS[name]

 

Value:

N/A

 

Units:

N/A

 

Range:

i=1–400, [name] = any legal program name

Jumps to program number or name and returns to the calling program when command processing reaches the EN command in the sub–routine. After the return, execution continues at the command immediately following the GS statement. Subroutines may be nested 16 levels deep. A Goto (GT) clears the subroutine stack, preventing future Gosubs from overflowing the stack or returning to the wrong location.

Example:

 

 

DI10 GS[Part A] GO

Run program “Part A”, return and make a 10 unit incremental move.

GT

Go to Program

syntax – GTi or GT[name]

 

Value:

N/A

 

 

Units:

N/A

 

 

Range:

i=1–199 (1–400 with 30k memory option), [name] = any legal program name

GT branches to the program number or name specified. All subsequent commands in the calling program are ignored. Nested loops and subroutine calls are cleared by a GT command.

Examples:

 

IF10 GT[PART A] EB

IF input 1 is on and input 2 is off, jump to program “Part A”

IF01 GT20 GT30 EB EN

IF input 1 is off and input 2 is on, run program 20. Program 30 is never run.

 

Use the GS command if you want to return to this program and goto

 

program 30.

6-12 Keypad Programming

MN1854

Image 67
Contents LinStep+ Dual-Axis Microstepping Indexer/Driver Table of Contents Arithmetic Operands and Equations Other Programming Samples Ii Table of Contents MN1854Increment/Decrement Variables Troubleshooting Serial Communications Problems Iv Table of Contents MN1854 Section General Information Limited WarrantyCE Compliance On next 2General Information MN1854 Product Notice Intended useCould result in injury or death Could result in damage to propertyVoltages that are conducted to its power input terminals. Do not touch any circuit board, power device or electricalConnection before you first ensure that power has been Do not apply AC power before you ensure that grounds areDriver should have specifications compatible to the drive Extend more than 0.2 5 into keypad assemblyInstead, we recommend using a four wire Wye Power is removed from the driveOverview Section Product OverviewMotors Product Overview MN1854 Receiving & Inspection Section Receiving and InstallationPower Dissipation Mechanical InstallationGND 2Receiving & Installation MN1854System Grounding Ungrounded Distribution System Input Power ConditioningPower Connections Power connections are shown in Figure Wire Size and Protection Devices4Receiving & Installation MN1854 Connection Locations 115VAC, 2 Axis MN1854 Receiving & InstallationTools Required 6Receiving & Installation MN1854RS-232 PC Connections 9 & 25 Pin RS-232 Cable Connections for UL InstallationsPC / Host Device 8Receiving & Installation MN1854Daisy Chain Connections Rules for Daisy Chain OperationTypical connection each input Programmable I/O ConnectionsOptional Opto I/O Connections These input connections are made at terminals 6-40 Figure+5VDC 10Receiving & Installation MN1854Encoder Signal PVS100 Danaher 9-Pin D Encoder Color CodeGround GND Motor ConnectorLD9068A00 Leadwire Connection 9 pin to flying leads Interlock IntlkSection General Information Start-Up ProcedurePower Off Checks Switch and Potentiometer SettingsHigh Power On ChecksAction Display Comments Motor should now be producing torqueReceiving & Installation MN1854 F1, F2, F3 Section Keypad OperationOverview Keypad layout with the LCD display is shown in FigureCopies one program to another within the LinStep+ Comma Decimal PointAlpha Shutdn RS232 Encoder TestThus eliminating the need for a PC terminal connection Trace Output MovePressing the Edit key displays a set of sub-menus Edit MenuSave Program? YesNo Save the programEdit an existing program 6Keypad Operation MN1854Mine AC.3 VE2 DI1 GO Naming a programExample of Naming a Program Press ESC. You will be prompted as shown in FigureUse the =O keys for additional alpha characters Entering Characters with the Alpha Key In edit mode8Keypad Operation MN1854 Submenu Setup Parameter Description of Setup Parameter Edit, Setup SubmenuPrograms stored Press ↓ to display the total Press EDIT, POS F3 Press YES F1 or no F3Press EDIT, ↓ , List to Display the numberSequentially Eeprom message disappears Pressing Help in the Main MenuPressing Help in Menus and Sub-Menus Pressing Help In the Program Edit functionProgram names COPY, to PAD SubmenuEnter the program number. Or, if You wish, you can scroll the listProcedure Format Definition Section SetupAxis One Motor Dir Setup MN1854Axis One Motor Type Steper Axis One Drive ResAxis One Encoder RES ↑5000 cnts/in ↓ Axis One ENC ModeOpen Loop Application NotesPM Gain IN-RANGE Setup WindowValue IN-RANGE WindowVmax Accel Amax Configure Your Application MechanicsMech Setup Dist500.0 in/s ↓→ Axis One Vel Units In/sEdit Axis One MAX VelIuuuuuuu ←↑↓→ Configure the I/OChar Keypad Display Input Character Description Reset to 1. This allows for input debounce and controlling Inputs will work. See the RG command for more detailsService routine program To summarize, when INT98CTRL=1Inputs Warm BootPower-up program, if defined, will start Jog SpeedOUT1 Programmable Pppppppp ←↑↓→ OFF Configure the Output StatesOPTO9 Input IiiiiiiiAccel LO-VEL HI-VEL Configure End of Travel Switch PolarityConfigure JOG Parameters EnableMode Edge Switch Configure Home ParametersOffset DIR Negative Axis One Final Dir Positive Configure Power-up Program↑SETUP↓ Power Up Program PROGRAM0Echo UNIT# Configure Serial CommunicationsRS232C Setup ↑ Enabled ↓Data Type Description of Display Data Type Configure Miscellaneous Setup ParametersPassword Type Description Gives access to these menus General Password RulesPassword Setup Opratr Admin ClearFunction Key Message to Display Keypad Program Command ListSection Keypad Programming Acceleration Start Home Outputs On/OffAC2 DE.5 VE12 DA3 GO DA3 GO DA3 GO Keypad Programming MN1854Value Units Range ExampleDC Distance to Change DC n + 10 + Example Distance to ChangeDCn * DCn*1 * Vn*1 2* Vnt w Examples of DC move profiles, AC = seconds, VE=ipsAC.1 VE60 DI2 GO DI1 GO DI-4 GO DE DecelerationLP2 DI3 GO EB Value Units Range N/AIF2,1 EN EB DI2 GO Copy DEL =12 =13 =17 =18 =22 =23=26 =27 =28 RUN EditExample 3-Screen Menu Program GH Start Home Set in Edit Setup Mech Accel VELValue N/A Units N/A Range N/A Go Immediate Syntax GI or GIiVE2 AC.1 DA4,2 GP GO Go Start a Move Syntax GO or GOiValue N/A Units N/A Range i=1-16 AC.05 DE.05 VE50 DI5 GOIf input 1 is on and input 2 is off, jump to program Part a Gosub Syntax GSi and GSname=1-400, name = any legal program name IF10 Gtpart a EBIFPARTS=25 GS20 EB Units RangeLppieces IV12,LENGTHDilength Value Units N/A Range N/A Syntax LPi LP LoopSyntax MC+ MC Move Continuous Move Continuous 27 7th character, 2nd row MS27,COUNTVE5 DA20 GO Powerup ONL,GTON EOTGthome MainOT4,1 Turn on Output OT2,0D1 = starting output number=0 input high. X=1 input low grounded =anything else ignore input changesSyntax RGr RG Registration Value N/A Units seconds SQRESULT=0 SQ27.96,SQRESULTValue N/A Units N/A ST1 AC1 DE1 VE25 DA6 GO VE50 DA0 GO ENWTexpression Syntax VEr VE Velocity= starting input number Helpful Hints Programming your application Summary of Expressions, Operators and FunctionsProgramming Overview Program Example of Hosted ModeVariable Names Built-in Variables Examples of how to use Built-in VariablesVariable Name Description of Built-in Variable Type Using Built-in Variable Arowrel Parts Non-Volatile VariablesLpnumber Instead, you should use AO15=VOLTAGE + ErrorArithmetic Operands and Equations Examples of incorrect useOther Programming Samples Logical OperatorsIncrement/Decrement Variables ExpressionsCreate a Message and Read an Input Variable Setting an Output=On on-the-flyCreate a Menu menu display on keypad display for operator Digit BCD=4 Digit BCD+2TW Read a 4 Digit BCD number, 2 Digits at a timeReading an Analog Input Value GET 4 BcdsAdditional Information General Section Troubleshooting1Operation Indicators 2Axis 1 and 2 IndicatorsAdditional Information Troubleshooting MN1854Serial Communications Problems Troubleshooting MN1854 LinStep+ LX 2 P 1 a Section Specifications & Product DataMN1854 Specifications & Product Data IdentificationVDC General SpecificationsProtection & Indicators Description VACOptional Keypad 10.08 256.0 Axis Driver 148.3 Dimensions94.7 230.1 Specifications & Product Data MN1854 EMC Conformity and CE Marking Wiring of Shielded Screened CablesSection CE Guidelines CE Declaration of ConformityGrounding Earth EMC Wiring TechniqueCE Guidelines MN1854 CitCable Screens Grounding EMC Installation InstructionsTo Controller Input Signal Cable GroundingSimulated Encoder Output Cable Grounding Encoder Cable GroundingProgramming Template Appendix aMN1854 Appendix A-1 Appendix MN1854 MN1854 Appendix A-3 111.25 Remote Keypad Mounting Template122.88 838Baldor Electric Company MN1854 01 C&J Baldor Electric CompanyLinStep+ Dual-Axis Microstepping Indexer/Driver