Baldor mn1854 manual Logical Operators, Increment/Decrement Variables, Expressions, WTAI12MAX Temp

Page 85

Logical Operators

Conditional commands (IF,WT, LU, LW) support logical operations of AND (&&) and OR (). Two expressions may be logically AND’d or OR’d within one conditional command. For example:

(A)=5 (B)=2.5 IF(A)>2&&(B)=2.5 MS1, “True Statement” EB

In this program, the message “True Statement” appears since BOTH conditional statements are true.

Increment/Decrement Variables

Four syntaxes are supported by variables: ++ (Single Increment), += (Value Increment), –– (Single Decrement), –= (Value Decrement). These operators will initialize any uninitialized variable to zero before incrementing or decrementing it for the first time.

(Variable Name)++

Increments a variable value by 1

(Variable Name)+=n

Increments a variable value by n

(Variable Name)– –

Decrements a variable value by 1

(Variable Name)–=n

Decrements a variable value by n

Expressions

Five conditional expressions are supported: less than (<), equal to (=), greater than (>), less than or equal to (<=), and greater than or equal to (>=). The IF and WT commands can use these expressions to direct program flow or wait for an analog input to meet a condition. The > and < symbols are entered into the keypad editor with the ALPHA+↑ +↑ ...↑

Examples:

IF (X)>10 GS20 EB

If X is greater than 10 gosub to program #20.

WT(AI12)<(MAX TEMP)

Wait for the temperature to go below the maximum

 

before continuing command processing.

Other Programming Samples

These sample programs provide an idea of how to solve simple programming tasks. To aid your program documentation, comments are placed in {brackets}. These comments are stripped from the program as it is downloaded for execution to help conserve memory. Files should be saved before downloading save the comments.

Example:

DI10,2 GO

Moves to load position

DI15,15 GO

Moves to unload position

6-30 Keypad Programming

MN1854

Image 85
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 Could result in injury or death Product Notice Intended useCould result in damage to property On next 2General Information MN1854Connection before you first ensure that power has been Do not touch any circuit board, power device or electricalDo not apply AC power before you ensure that grounds are Voltages that are conducted to its power input terminals.Instead, we recommend using a four wire Wye Extend more than 0.2 5 into keypad assemblyPower is removed from the drive Driver should have specifications compatible to the driveOverview Section Product OverviewMotors Product Overview MN1854 Power Dissipation Section Receiving and InstallationMechanical Installation Receiving & InspectionGND 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 InstallationsDaisy Chain Connections 8Receiving & Installation MN1854Rules for Daisy Chain Operation PC / Host DeviceOptional Opto I/O Connections Programmable I/O ConnectionsThese input connections are made at terminals 6-40 Figure Typical connection each inputEncoder Signal PVS100 Danaher 9-Pin D 10Receiving & Installation MN1854Encoder Color Code +5VDCLD9068A00 Leadwire Connection 9 pin to flying leads Motor ConnectorInterlock Intlk Ground GNDPower Off Checks Start-Up ProcedureSwitch and Potentiometer Settings Section General InformationAction Display Comments Power On ChecksMotor should now be producing torque HighReceiving & Installation MN1854 Overview Section Keypad OperationKeypad layout with the LCD display is shown in Figure F1, F2, F3Copies one program to another within the LinStep+ Comma Decimal PointAlpha Thus eliminating the need for a PC terminal connection TestTrace Output Move Shutdn RS232 EncoderPressing the Edit key displays a set of sub-menus Edit MenuEdit an existing program Save the program6Keypad Operation MN1854 Save Program? YesNoExample of Naming a Program Naming a programPress ESC. You will be prompted as shown in Figure Mine AC.3 VE2 DI1 GOUse 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 SubmenuPress EDIT, ↓ , List to Press EDIT, POS F3 Press YES F1 or no F3Display the number Programs stored Press ↓ to display the totalPressing Help in Menus and Sub-Menus Pressing Help in the Main MenuPressing Help In the Program Edit function Sequentially Eeprom message disappearsEnter the program number. Or, if COPY, to PAD SubmenuYou wish, you can scroll the list Program namesProcedure Format Definition Section SetupAxis One Motor Type Steper Setup MN1854Axis One Drive Res Axis One Motor DirOpen Loop Axis One ENC ModeApplication Notes Axis One Encoder RES ↑5000 cnts/in ↓Value IN-RANGE Setup WindowIN-RANGE Window PM GainMech Setup Configure Your Application MechanicsDist Vmax Accel AmaxEdit Axis One Vel Units In/sAxis One MAX Vel 500.0 in/s ↓→Iuuuuuuu ←↑↓→ Configure the I/OChar Keypad Display Input Character Description Service routine program Inputs will work. See the RG command for more detailsTo summarize, when INT98CTRL=1 Reset to 1. This allows for input debounce and controllingPower-up program, if defined, will start Warm BootJog Speed InputsOUT1 Programmable Pppppppp ←↑↓→ OPTO9 Input Configure the Output StatesIiiiiiii OFFConfigure JOG Parameters Configure End of Travel Switch PolarityEnable Accel LO-VEL HI-VELMode Edge Switch Configure Home ParametersOffset DIR Negative ↑SETUP↓ Configure Power-up ProgramPower Up Program PROGRAM0 Axis One Final Dir PositiveRS232C Setup Configure Serial Communications↑ Enabled ↓ Echo UNIT#Data Type Description of Display Data Type Configure Miscellaneous Setup ParametersPassword Setup General Password RulesOpratr Admin Clear Password Type Description Gives access to these menusSection Keypad Programming Keypad Program Command ListAcceleration Start Home Outputs On/Off Function Key Message to DisplayValue Units Range Keypad Programming MN1854Example AC2 DE.5 VE12 DA3 GO DA3 GO DA3 GODC Distance to Change DCn * DCn*1 * Vn*1 2* Vnt w Example Distance to ChangeExamples of DC move profiles, AC = seconds, VE=ips DC n + 10 +AC.1 VE60 DI2 GO DI1 GO DI-4 GO DE DecelerationLP2 DI3 GO EB Value Units Range N/AIF2,1 EN EB DI2 GO =26 =27 =28 =12 =13 =17 =18 =22 =23RUN Edit Copy DELExample 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 GIiValue N/A Units N/A Range i=1-16 GO Go Start a Move Syntax GO or GOiAC.05 DE.05 VE50 DI5 GO VE2 AC.1 DA4,2 GP=1-400, name = any legal program name Gosub Syntax GSi and GSnameIF10 Gtpart a EB If input 1 is on and input 2 is off, jump to program Part aIFPARTS=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,COUNTGthome Powerup ONL,GTON EOTMain VE5 DA20 GO=0 input high. X=1 input low grounded = starting output number=anything else ignore input changes OT4,1 Turn on Output OT2,0D1Syntax RGr RG Registration Value N/A Units N/A SQRESULT=0 SQ27.96,SQRESULTST1 AC1 DE1 VE25 DA6 GO VE50 DA0 GO EN Value N/A Units secondsWTexpression 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 Arithmetic Operands and Equations AO15=VOLTAGE + ErrorExamples of incorrect use Instead, you should useIncrement/Decrement Variables Logical OperatorsExpressions Other Programming SamplesCreate a Message and Read an Input Variable Setting an Output=On on-the-flyCreate a Menu menu display on keypad display for operator Reading an Analog Input Value Read a 4 Digit BCD number, 2 Digits at a timeGET 4 Bcds Digit BCD=4 Digit BCD+2TW1Operation Indicators Section Troubleshooting2Axis 1 and 2 Indicators Additional Information GeneralAdditional Information Troubleshooting MN1854Serial Communications Problems Troubleshooting MN1854 MN1854 Specifications & Product Data Section Specifications & Product DataIdentification LinStep+ LX 2 P 1 aProtection & Indicators Description General SpecificationsVAC VDCOptional Keypad 10.08 256.0 Axis Driver 148.3 Dimensions94.7 230.1 Specifications & Product Data MN1854 Section CE Guidelines Wiring of Shielded Screened CablesCE Declaration of Conformity EMC Conformity and CE MarkingCE Guidelines MN1854 EMC Wiring TechniqueCit Grounding EarthCable Screens Grounding EMC Installation InstructionsSimulated Encoder Output Cable Grounding Input Signal Cable GroundingEncoder Cable Grounding To ControllerProgramming Template Appendix aMN1854 Appendix A-1 Appendix MN1854 MN1854 Appendix A-3 122.88 Remote Keypad Mounting Template838 111.25Baldor Electric Company MN1854 01 C&J Baldor Electric CompanyLinStep+ Dual-Axis Microstepping Indexer/Driver