fagor 8040 User Manual

Page 1
SUMMARY
PLC RESOURCES:
INPUTS(I) These are elements used to collect and adapt the signal received from the outside OUTPUTS(O) These are elements used to send outside signals with which the plc operates in its environment MARKS(M) These are elements capable of memorizing information regarding the internal status of the plc, acting like an internal relay REGISTERS(R) These are elements which allow a numerical variable or discrete variable status to be memorized TIMERS(T) These are elements which alter their output for a specific time (Time constant) COUNTERS(C) These are elements capable of counting up or down a specific number of events
INPUTS They supply information to the PLC from signals received from the outside world. The inputs are referenced by indicating the letter I and its number, ex I01. The maximum inputs that the CNC can have is 256 inputs, depending on the configuration.
OUTPUTS PLC sends information outside through its outputs. They allow the PLC
to turn on/off different devices. The maximum outputs that the CNC can have is 256 outputs depending on the configuration. With the Axes module only, there are 24 outputs. The outputs are referenced by indicating the letter O and its number, ex O16 MARKS A mark, or internal relay, is a memory in which the information defined by the user is retained. Each mark stores a bit or logic state Marks are referenced by indicating letter M and its number
MEANING
------------------------------------------------------------------------------------------------------------------------­ User marks M1 - M2000 Arithmetic flag marks M2001 - M2008 Clock marks M2009 - M2024 Fixed status marks M2046 & M2047 Marks associated with messages M4000 - M4127 Marks associated with errors M4500 - M4563 Screen marks M4700 - M4955 CNC communication marks M5000 - M5957
---------------------------------------------------------------------------------------------------------------------------
Page 2
REGISTERS They allow a numerical value to stored in 32 bits or aid in CNC-PLC
communications with logic CNC inputs - outputs Their value will be stored in memory even when the system is turned off unless erased in the initial cycle. This is encouraged unless there is a specific register value you want to remember. They are represented by the letter R and there are 256 user registers and other special registers. It is also possible to reference a bit of a register. eg. B3 R200 (bit 3 of register 200)
MEANING
-------------------------------------------------------------------------------------------------------------------------­ User registers R1 - R256 Special registers R500 - R559
------------------------------------------------------------------------------------------------------------------------------
TIMERS A Timer is resource capable of maintaining its output at a specific logic level during a pre-selected time, after which the output changes its status TEN:ENABLE INPUT In order for the timer to count time, the TEN INPUT must be at a logic level of “1”. TRS:RESET INPUT When there is a transition from logic level “0” to “1”, the T status sets to “0” as well as th elapsed time t an the timing stops, if it was running. TG1/4:TRIGGER INPUTS The triggering is originated by a change of the logic state of any of these inputs from “0” to “1” depending on the selected input ex. TG1 20 100 Indicates the trigger input1 of timer 20 with a time constant of 1 second TG4 32 R40 Indicates the trigger input4 of the timer 32 with a time constant equal to the value stored in register 40, in hundredths of a second. *T:STATUS This OUTPUT indicates the logic state of the timer. *t:ELAPSED TIME 16 bit binary output indicates the elapsed time within the timer. can only be used in arithmetic and comparison operations ex. CPU T1 GT 1000 This expression will check(cpu) whether the time elapsed in t1 is greater (GT) 1000 hundredths of a second (10 seconds)
OPERATING MODES OF A TIMER
MONOSTABLE The timer generates a pulse whose width is determined by the time constant
ACTIVATION DELAY This mode allows the creation of a delay from the time the trigger input TG2 is activated to the time the output T of the timer is activated.
eg. I2 = TG1 T1 5000 T1 = O2 when input 2 is turned on, O2 will be on for 5 seconds.
DEACTIVAT. DELAY This mode allows to create a delay from th time TG3 is deactivated to the time output T of the timer is deactivated.
Page 3
eg. I3 = TG2 T1 5000 T1 = O2 when input 2 is turned on, O2 will wait 5 seconds then turn on.
SIGNAL LIMITER This mode allows to limit the duration of the signal at input TG4
COUNTERS The counter is an element capable of counting up or down
*CEN:ENABLE INPUT *CEN must be”1” in order to count. *CUP:UP-COUNT INPUT Each leading edge at this input increments the count by one *CDW:DOWN-COUNT I/P Each leading edge at this input decrements the count by one *CPR:PRESET INPUT A leading edge at this input will preset the counter with the specified count ex. CPR 12 -10 indicates the preset input of counter 12 with an initial count of -10 *C:STATUS This output indicates, with a logic level, the status of the counter *c:COUNT VALUE This 16 bit output indicates the count value; can only be used for arithmetic and comparison operations.
eg. DFU I5 = M1 M1 AND M2018 = CUP3 CPS C3 GE 300 =O20
When I5 is high, M1 and M2018 (4second pulse) is also high, it will activate Counter 3. When the count is at 300 (300 seconds, 5 min), o20 will turn on.
PROGRAMMING: The PLC program is structured by modules and it could cocnsist of:
First Cycle module(CY1) Main module(PRG) Periodic Execution module(PE)
Programming with real values allows optimum execution speed of the plc DIRECTING INSTRUCTIONS:
END: Indicates the end of any module REA: Indicates that from that point on real values must be used IMA: Indicates that from that point on image values must be used PRG.PE1,CY1 Indicates the beginning of the modules that can be defined in plci user prog. END End of the module L Label. used to identify a program line DEF Definition of symbol. Allows a symbol to be associated with any plc variable
FLANK DETECTION
DFU: Returns a “1” when a leading edge(up flank) has occurred during the running cycle at the input, output, or mark specified DFD: Returns a “1” when a trailing edge(down flank) has occurred during the running cycle at the input, output or mark specified
COMPARISON OPERATORS
CPU: Unsigned NOT CPS: Signed Comparison AND
Page 4
GT: Greater than OR GE: Greater or equal XOR EQ: Equal ( ) NE: Not equal LE: Less or equal LT: Less than
ACTION INSTRUCTIONS
BINARY assignment: The value(0/1) of the logic expression can be assigned to specified variable conditional: SET The result of a logic action is 1, this action assigns a 1 to the I,O,M,R RES The result of a logic action is 1, this action assigns a 0 to the I,O,M,R CPL The logic expression is a 1, this action complements the status of I,O,M,R The logic expression is a 0, this action will not modify the status
SEQUENTIAL Allows the program sequence to be interrupted and continue on another line jump (JMP) The expression is 1, the program jumps to the line and continues the program calling a subroutine (CAL) The expression is 1, the program jumps to the line and continue the program return (RET) The expression is 1, this action indicates the end of subroutine & returns ARITHMETIC ACTION MOV Transfers the logic status of the origin indicated to specified destination
Source Destination Source Code Dest. Code #bits to transmit
----------------------------------------------------------------------------------------------------------------------------­MOV I1/256 I1/256 0 (Bin) 0 (Bin) 32 O1/256 O1/256 1 (BCD) 1 (BCD) 28 M1/5957 M1/5957 24 T1/256 R1/559 20 C1/256 16 R1/559 12 # 8, 4
-------------------------------------------------------------------------------------------------------------------------------
ADS,SBS,MLS,DVS,MDS If the logic expression result is 1, this will allow addition, subtraction, multiplication, division, and module or remainder of division
LOGIC ACTION
AND, OR, XOR The logic expression result is 1, these actions allow the logic operations
SPECIFIC ACTION
ERA Allows inputs, outputs, marks, or registers to be erased CNCRD Allows reading of inernal variables CNCWR Allows writing of internal variables
Loading...