Operating Instructions COMPAX-M / -SArithmetic1148.4.30.2 Arithmetic and variablesValues can be linked with one another using the four basic types of calculation andthe result can be assigned to a parameter or a variable.A simple arithmetic term is:♦ ♦ P10+10; V1-S1; 2*P13; P13/P14;V7\V3; S12%P40♦ ♦ POSA .V10; SPEED .V30; ...Operations are not allowed after commands; use variables instead for such cases,e.g..N001: V001= S1 + 100.5 not allowed: POSA S1 + 100.5N002: POSA .V001Function Example:+ for addition P10+10- for subtraction V1-S1* for multiplication 2 * P13/ for division P13/P14\ for whole number division(formation of the whole numbercomponent)V7\V3: where V7=30 and V3=7, the resultis:V7\V3=4V7/V3=4.2857...; whole numbercomponent= 4% for the formation of the divisionremainder (Modulo) S12%P40 with S12=30 and P40=7, theresult is:S12%P40=2S12/P40=4 remainder 2; division remainder= 2The following operands may be used:• constants,• parameters,• status values, (S1-S15, S30, S40ff)• variables (V1-V39); after commands with preceding point (full stop): POSA .V1Not all status values can be used as operands.Status values S01 to S15, S30, and S40ff are permitted.In addition to the 10 user parameters P40 to P49, 39 variables V1-V39 areavailable. V0 is used for global assigning of a value to all variables.The variables are automatically buffer-stored in the ZPRAM, i.e. after Power Onthey contain the old value.When the cam controller is switched off (V50=0), it is possible to use the variablesV51 ... V70 as free variablesAfter commands the variables (like user parameters P40 to P49) arepreceded by a "point" (full stop): POSA .V1, ACCEL .V22V0 is used for globally assigning a value to all variables.Example:V0=0: V1...V70=0V0=17: V1...V70=17With the instruction V0=x, variables V50 ... V70 and therefore the settings of thecam controller are also changed!Syntax:Operators:OperandsStatus values:Variables:Note:Note:Global assignment:Note!POSAPOSRSPEEDACCELOUTPUTPasswordSPEEDSYNCMarkreferencePOSRSPEEDPOSROUTPUTCamcontrollerWAITGOTOGOSUBRETURNENDREPEATIF I..ComparisonWAIT StartGOTO /GOSUB EXTIF Error/ StopArithmeticPositionmonitoringIdle displaySpeedmonitoringEngage /disengagebrake / finalstageVariablevoltage