Home

- Service, Support

image

Contents

1.
2. Table 4 2 Terminal connector assignments of terminals 21 through 40 Termin 1 0 Name Encoder function LED al no 5 V encoders SSI master SSI listen 24 V encoders 21 3L Power supply for section 3 encoder circuits 22 3M Ground for section 3 encoder circuits 23 3M Ground for section 3 encoder circuits 24 Output 5V output Encoder power supply 5 2 V Red 25 Output 24V output Encoder power supply 24 V Red 26 Input Encoders Signal A Master Listen 112 SSI D data SSI D data 27 Input Encoders Signal A SSI D data SSI D data 12 inverse inverse inverse 28 Input Encoders Signal B 113 SSI CK shift 113 clock 29 Input Encoders Signal B 1 13 SSI CK shift 13 inverse clock inverse 30 Input Encoders Signal N 114 114 114 31 Input Encoders Signal N 1 14 14 14 inverse 32 Output Encoders SSI CK shift clock 33 Output Encoders SSI CK shift clock inverse 34 35 36 Input 18 18 18 18 18 Green 37 Input 19 19 19 19 Signal A Green 38 Input 110 110 110 110 Signal B Green 39 Input 111 111 111 111 Signal N Green 40 3M Ground for section 3 encoder circuits FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 37 Wiring the FM 352 5 4 3 Wiring the FM 352 5 module 4 3 Wiring the FM 352 5 module Wiring Front Connectors To attach the signal wire
3. Diagnostic functions Yes e Group error display SF red LED e SIMATIC Micro Memory Card error 3 MCF red LED e Monitoring of the power supply voltage of the DCSV green LED electronics e 1 O fault status IOF red LED e RUN mode RUN green LED e STOP mode STOP yellow LED e Power supply fault 5VF red LED encoder 24VF red LED e Input status Green LED I O to I 11 e Output status Green LED Q 0 to Q 7 FM 352 5 high speed Boolean processor 212 Operating Manual 05 2011 A5E00131318 04 Technical specifications A 2 Technical specitications Boolean processor operation Execution time 1 us PLC update cycle time 2 6 ms max 5 ms Program and hardware response time 2 to 6 us input to output 1 Diagnostic indications for these conditions are available only when enabled in the Parameters tab of the FM 352 5 Properties dialog 2 Output overload diagnostics may not be reported if the output pulse duration is less than 2 ms 5AH01 or less than 20 us 5AH11 3 MCF LED status is only updated when the SIMATIC Micro Memory Card is removed or when the module is to read or write the SIMATIC Micro Memory Card FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 213 Technical specifications A 3 Block diagram A 3 Block diagram Description The following figure shows a block diagram with the essential hardware components of the FM
4. Description When the FB is enabled the DWORD input word is converted into two WORDs OUT_A is the most significant word and OUT_B is the least significant word If there is logic for EN the output is latched The output changes only when EN is active This operation requires one phase if there is logic for EN With logic for EN the WordCast value is retentive requiring storage and a phase clock IN OUT_A OUT_B Figure 6 55 Example of Wordcast LAD representation Parameter Data type Addresses Description WordCast IN DWORD Input constant Input with the most significant EN ENO ae OUT_A WORD Output Output of the function most Sea significant word of IN OUT_Br OUT_B WORD Output Output of the function least significant word of IN FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 161 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 27 Period measurement PERIOD16 PERIOD32 Description This PERIOD operation is available in two versions As a 16 bit bit version FB81 and a 32 bit version FB80 defined by the output WORD or DWORD While EN is active OUT is updated on every rising edge at IN VALID is true when OUT has valid data VALID is false if OUT cannot represent the count rollover occurs and it is false until the initial period has not been measured OUT is useful for measuring low frequencies where FREQ
5. DOut 5 DIn 2 DIn 3 DIn 4 DIn 13 1056 SReg2 EN ENO Reset Out1 DOut 6 Data1 Out2 DOut 7 Data2 Clock Length Figure 6 8 Examples of shift registers from the FBs of the library 86 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block The following figure shows examples of how the MOVE operation can be used to connect values to the CPU inputs When necessary the MOVE operation can also be used to convert values from one data type to another MOVE MOVE EN ENO EN ENO Encoder C CPU_In En Conn arrD CPU_In T1 ur_Val IN OUT c_CV1 ICon 0 IN OUT _CV MOVE MOVE EN ENO EN ENO CPU_Out T Conn arrl CPU_Out C 2_PV IN OUT Con 3 mpByte IN OUT Conn ICon MOVE MOVE EN ENO EN ENO Conn arrl CPU_In T2 Conn arrl CPU_In C1 Con 2 IN OUT _CVasByte Con 0 IN OUT _CVasByte 1 The MOVE operation can be used to connect values to the CPU inputs With no logic for EN the MOVE operation is interpreted as a connector With the logic for EN the value of MOVE is retentive requiring storage 2 The MOVE operation can be used to convert a byte from the CPU output area to the data type INT to be used for compares or defaults This works for posi
6. FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 207 Technical specifications A 2 Technical specitications 208 Data for selecting an actuator 5AH01 current sinking output r For o to 4 Max 2 us Typically 1 0 us Output dv dt for resistive load e For 1 to 0 Max 15 V Us Typically gt 50 V us For 0 to 1 Max 12 V Us Typically gt 39 V us Lamp load Max 5 W Connecting two outputs in parallel Possible e For redundant triggering of a load e To increase performance Possible max 1A resistive only Triggering a digital input Not possible Switching frequency e For resistive load Max 20 kHz at 0 5 A max 100 kHz at 0 25 A e With inductive loads e For lamp load See Switching frequency for inductive loads ithout commutating diodes Page 220 Max 10 Hz Limit internal of the inductive circuit interruption voltage Max M 55 V Typically M 45 V Short circuit protection for the output Electronic e Threshold on Typically 1 7 Ato3 5A Cable length e Unshielded 100 m Shielded 600 m 1 Not protected by inductive kickback gt 55 mJ 2 The outputs are not protected against reverse voltage if the current is not limited to lt 3 A FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Tec
7. 1254 0 stat FF STRUCT Resources for R S and S R Each can be changed cannot be changed element must be BOOL or an array of BOOL 0 0 stat FirstFF BOOL The number of elements can be can be changed can be changed can be changed increased as needed 0 1 stat SecondFF BOOL The names of elements can be freely can be changed can be changed can be changed assigned 0 2 stat ThirdFF BOOL can be changed can be changed can be changed 2 0 stat MoreFFs ARRAY 0 15 can be changed can be changed can be changed 0 1 stat BOOL can be changed 4 0 stat END_STRUCT can be changed Static section This You can use any combination of BOOL or Array of BOOL definition is not position specific You ca n change the names inside the structure except for Edge 1258 0 stat Edge STRUCT Resources for edge detection Each can be changed cannot be changed element must be BOOL or an array of BOOL 0 0 stat FirstEdge BOOL The number of elements can be can be changed can be changed can be changed increased as needed 0 1 stat SecondEdge BOOL The names of elements can be freely can be changed can be changed can be changed assigned 0 2 stat ThirdEdge BOOL can be changed can be changed can be changed 2 0 stat Edge4to10 ARRAY 4 10 can be changed can be changed can be changed 0 1 stat BOOL can be changed 4 0 stat LastEdge BOOL can be changed can b
8. LAD representation Parameters Data type Address Description EN BOOL Input Enable input ENO BOOL Output Enable output IN DWORD Input Value to be shifted N WORD Input Number of bit positions to be shifted OUT DWORD Output Result of shift operation hee 16 15 0 N N 3 3 digits 132 Those three bits The released digits are assigned zeroes will be lost Figure 6 35 Example of Bit Shifts for the SHR_DW Shift Right Double Word Instruction Din 0 SHR_DW Dout o EN ENO _ _ Conn arrDWCon 0 IN OUT Conn arrDWCon 1 Conn arrWCon 0 N Figure 6 36 Example of the SHR_DW Shift Right Double Word Instruction The SHR_DW box is enabled when 1 is set at DIn 0 Conn arrDWCon 0 is loaded and shifted right by the number of bits specified with Conn arrWCon 0 The result is written to Conn arrDWCon 1 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 29 Description 6 9 Instruction Set for LAD Programming ROL_DW rotate left double word The ROL_DW rotate left double word operation is enabled by signal state 1 at the Enable EN input The ROL_DW operation is used to rotate the entire contents of input IN bit by bit to the left Input N specifies the number of bit positions for the rotation If N is greater than 32 the double word IN is r
9. eccccecceceeeeeeeeeeeaeceeeeeeeseceaeaeceeeceeeseceaaaeceeeeeeesecuaeeeeeeeseeseiesaeeneees 206 A 3 Block didga sesssrareni tncaeeisaseed uatacadeanshsadey aAa 214 A 4 Operating data occ csccccccvtsenccesvesccecuassaceecushaccecusauccecbasaccccusuadeceustandceusuaeceebaaccceusuadecevavadecbavabeceenanae 218 A 5 Switching frequency for inductive loads without commutating diodes ceeeeeeeeeeeeeees 220 A 6 Function block declaration table ecceeeeceeeeeeeeneeeeeeeneeeeeeaeeeeeeaaeeeeesaaeeeseeaeeeeeeaeeeeeenateeseaas 230 A 7 Valid operations for FM 352 5 MOdUIE cccccecceeeesecneceeeeeeeseccenaeceeeeeeesecacaeeeeeeeeesecseaeeneess 236 B External Protection Circuit for FM 352 5 Boolean Processor ccescceesseeeeeeeeeeeeeeeeaeeseeeeeeeaeeeseaeeeaes 243 Pants ISUS i iisccececdes nertied ale ved nee a rE a aea a ara Era eased tenia ee eaten 247 FM 352 5 high speed Boolean processor 10 Operating Manual 05 2011 A5E00131318 04 Product overview 1 1 1 Functions of the FM 352 5 module Overview The FM 352 5 is a Boolean processor that allows independent and extremely fast control of a process within a larger control system The FM 352 5 module can be configured to operate in the following ways e The FM 352 5 module can operate in a coprocessor configuration within an S7 programmable controller system In this configuration the FM 352 5 exchanges input output data and status and control inf
10. 5 5 Setting up the hardware configuration 5 5 Setting up the hardware configuration Creating a project When you start STEP 7 the highest level in SIMATIC Manager is displayed You can then either open an existing project or create a new one For further information on creating a STEP 7 project refer to the STEP 7 User Manual or the STEP 7 online help Accessing the Hardware Configuration Double click on the hardware icon in the project directory on the right hand side to open hardware configuration The HW Config dialog is made up of three panes see figure below 4 HW Config SIMATIC 300 Station Edit Insert PLC View Options Window Help Dlels 2 S E alata JES 82 ae FEISIMATIC 300 Contouoton s7_pot ann A TDO UR PROFIBUS DP SIMATIC 300 07 59 cP 300 FM352 5 3 CPu 300 5 FM 300 C FM Coprocessors FM352 5 Boolean Coprocessor M7 Application Modules L Cam Controllers E CNC s L Controller Modules C Counter Modules J Positioning Modules Heese J IM 300 J M7 EXTENSION 4 PS 300 lg PS 307 104 ab PS 307 24 Jf PS 307 54 6ES7 307 1EA00 0440 PS 307 54 CPU 315 6E57 315 14F03 0480 RACK 300 SS a D Rail C SM 300 HH SIMATIC 400 SIMATIC PC Based Control 300 400 amp SIMATIC PC Station 6ES7 352 S4HO0 0AEO Zd Boolean Coprocessor 12D1 8D0 Encoder Press F1 to get Help FM 352 5 high
11. Note No logic is allowed at the EN input 140 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 5 Clock pulse generator CP_Gen Description The clock pulse generator FB119 allows you to output a pulse at a specified frequency from less than 1 Hz to a maximum of 50 kHz When the signal state at the ENABLE input is 1 a clock pulse is generated at the Q output as shown in the figure below The output frequency is specified by inverting the value of the word input WORD that is an unsigned integer represented as a hexadecimal value multiplied by 20 us The frequency is equal to 50 000 PERIOD PERIOD is equal to 50 000 divided by the desired frequency Example e When PERIOD W 16 C350 a frequency of 1 Hz is output e When PERIOD W 16 1 a frequency of 50 kHz is output Signal states enasi e UWUUUU UT Time Figure 6 45 Timing Diagram for Clock Pulse Generator CP_Gen Table 6 52 Clock pulse generator CP_Gen LAD representation Parameter Data type Addresses Description ENABLE BOOL Input Start input Q BOOL Output Status of the time CP_G oo PERIOD WORD Constant or The number of 20 us steps in the JEN ENO variable period ENABLE Q connector or CPU_Out PERIOD Note No logic is allowed at the EN input
12. 6 70 Operations in the FM 352 5 Library 6 10 12 Add FMAdd32 and FMAdd16 Description FMAdd adds the value at the IN_A input to the value at the IN_B input and writes the result to the OUT output The OVF output is set to logic 1 if an overflow occurs otherwise it is logic 0 Table 6 59 Add FMAdd32 and FMAdd16 LAD representation Parameter Data type Addresses Description FMAdd32 IN_A INT DINT Input Input value A EN ENOF IN_B INT DINT Input Input value B INA ovF OVF BOOL Output 1 if add results in overflow inp outT OUT INT DINT Output Output value IN_A IN_B Note No logic is allowed at the EN input 6 10 13 Subtract FMSub32 and FMSub16 Description FMSub subtracts the value at the IN_B input from the value at the IN_A input and writes the result to the OUT output The OVF output is set to logic 1 if an overflow occurs otherwise it is logic 0 Table 6 60 Subtract FMSub32 and FMSub16 LAD representation Parameter Data type Addresses Description FMSub32 IN_A INT DINT Input Input value A EN ENO IN_B INT DINT Input Input value B INA ovF OVF BOOL Output if subtract results in overflow IN_B out OUT INT DINT Output Output value IN_A IN_B Note No logic is allowed at the EN input FM 352 5 high speed Boolean processor 148 Operating Manual 05 2011 A5E00131318 04 Programming and
13. 9 2 Non S7 CPU system requirements 9 2 Non S7 CPU system requirements Importing GSD File Data In systems with third party CPUs you must import the GSD file with a configuration software package that can incorporate the GSD file data to create your hardware configuration Consult the documentation for your system for information on how to import the GSD file You can find GSD files on the Internet at Siemens Industry Automation and Drive Technologies Service amp Support http support automation siemens com WW view en 1080531 7 133100 be found at http www profibus com under the Libraries tab Siemens The path can also SIMATIC Micro Memory Card Programming For third party CPU systems you must program the SIMATIC Micro Memory Card independent of the FM 352 5 module To do this you need either a Siemens PG with SIMATIC Micro Memory Card programming capability or a PROM writer that can program an SIMATIC Micro Memory Card After programming the SIMATIC Micro Memory Card insert the SIMATIC Micro Memory Card in the FM 352 5 module Developing an Interface Function 200 As anon S7 CPU system user you must develop a function in your program to control the module s interface that meets your specific system s requirements Your program interface must be able to command the FM 352 5 module to enter normal operation and RUN STOP modes It must also manage the transfer of data between the module and the master CPU
14. However the reset is only executed when the inputs A and B have reached the active state 4 You release program memory resources by disabling the hardware support for any of these functions For example if your application program does not require hardware interrupts you can disable the hardware support of hardware interrupts to gain more program memory You must however use these advanced parameters with caution Do not disable any of these diagnostic functions unless you are certain you will not need them in your program 5 Checks whether hardware configurations of FM and CPU match see chapter Checking the onsistency of program and configuration Page 48 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Configuring the FM 352 5 module 5 8 Selecting input filters 5 8 Selecting input filters Description of Filter Behavior The filters of the FM 352 5 module are noise filters Noise pulses are filtered out of the input signal if the noise pulse is shorter than the delay time Pulses that are equal to the delay time or longer are allowed through to the program The filters delay the input signal for the delay time The input delay for a given input will be determined by the input type the voltage oscillation of the signals the time an input is held active or inactive and the selected delay filter 24 V input characteristics The 24 V inputs are a slower input type and have the
15. The figure below illustrates single evaluation of the signals Signal A Signal B Up Count pulses Down Count pulses Figure 7 7 Double Evaluation zF l 3 to To o E y E l e o eS ee a Up Single Evaluation Down Double evaluation x2 means that the rising and falling edges of signal A are evaluated The level of signal B determines the direction of counting e The counter increments on the rising edge of A when B is low and on the falling edge of A when B is high e The counter decrements on the rising edge of A when B is high and on the falling edge of A when B is low The figure below illustrates double evaluation of the signals Signal A Signal B Up Count pulses Down Count pulses Figure 7 8 ee tf as ae Up Double Evaluation FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Down 179 Encoder signals and their evaluation 7 5 Pulse Evaluation Quadruple Evaluation Quadruple evaluation x4 means that the rising and falling edges of A and B are evaluated The levels of signals A and B determine the direction of counting e The counter increments on the rising edge of A when B is low on the falling edge of A when B is high on the rising edge of B when A is high and on the falling edge of B when A is low e The counter decrements on the falling edge of A when B
16. D D CK and CK e Message frame length 25 bits or 13 bits Gray code e Resolution Max 16 777 216 e Delay times monoflop 16 32 48 or 64 us e SSI shift register length 13 bits or 25 bits e Clock rate 125 kHz 250 kHz 500 kHz or 1 MHz FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Technical specifications A 2 Technical specitications Encoder section e Data shift direction Left or right e Data shift length 0 to 12 bits e SSI modes Master listen up to two stations Cable length HTL incremental encoders 25 m shielded max at 50 kHz Siemens type 6FX2001 4 50 m shielded max at 25 kHz Cable length RS 422 5V incremental encoders 32 m shielded max at 500 kHz Siemens type 6FX2001 2 5 V supply Cable length RS 422 5V incremental encoders 100 m shielded max at 500 kHz Siemens type 6FX2001 2 24 V supply Cable length SSI absolute encoders Siemens Max 320 m shielded at 125 kHz type 6FX2001 5 24 V supply Max 160 m shielded at 250 kHz Max 60 m shielded at 500 kHz Max 20 m shielded at 1 MHz Frame times of the encoders Encoder frame times 13 bit 25 bit e 125kHz 108 us 204 us e 250 kHz 54 us 102 us e 500 kHz 27 us 51 us e 1MHz 14 us 26 us Sensor power supply outputs 5 2 V output power for sensors and encoders e Supply output 5 2 V
17. Downloading the program to the S7 CPU Before you test your application FB you should check the syntax using the Syntax check button in the Configuration dialog of the FM 352 5 on the Programming tab Correct any syntax errors that may have been found during the check You must test your program in the STEP 7 environment so that you can monitor the execution of the program instructions To test your application FB using the S7 CPU with the FM 352 5 module in test mode download the following elements to the CPU in addition to the blocks in your regular CPU program e Application FB containing the FM 352 5 program with the up to date instance DB e Interface FB for test mode of the FM with instance DB FB 30 DB 30 in the FM 352 5 library To download the program to the S7 CPU follow the steps outlined below 1 In HW Config select the menu command Station gt Save and Compile to save and compile the hardware configuration 2 In the SIMATIC Manager download the S7 program Blocks folder including the system data to the S7 CPU Monitoring the Program Execution STEP 7 provides several options for monitoring the execution of your program Refer to STEP 7 documentation for information on how to use the program monitoring functions By using an iterative procedure when editing the application FB and downloading it again each time to check the execution results you can check that the program meets your needs before downlo
18. In addition if you have not yet commissioned the FM 352 5 module in your STEP 7 environment when you created and tested your program you may want to incorporate controls to be able to switch to Test mode to check that the module is correctly connected to the inputs and outputs and that the module counter configuration is correct Single scan program execution is another tool that is useful in testing a program FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Using the FM 352 5 with non S7 masters 9 3 User data interface 9 3 User data interface User data The master CPU has access to a total of 16 bytes of input data and 16 bytes of output data during the FM 352 5 module operation The first two output bytes are used to transmit control information and the first two input bytes output status information to the CPU In normal operation the remaining 14 bytes are free from inputs and outputs exchanged between the module and the CPU as shown in the table below Table 9 1 User Data Input and Output Bytes in Normal Mode Byte address Output data to module Input data from module 0 Control byte 1 Status byte 1 1 Control byte 2 Status byte 2 2 Free outputs Free inputs 15 Free outputs Free inputs In Test mode the remaining 14 bytes are pre defined as shown in the table below This mode allows the module to transmit specific internal information to and from the Test FB to
19. REQ DONE IN A OVF IN_B OUT Remain Parameter Data type Addresses Description REQ BOOL Input Enables the Divide operation on a 0 to 1 change It must remain 1 until DONE 1 otherwise divide terminates IN_A DINT Input Dividend IN_B INT Input Divisor DONE BOOL Output 1 result is available OVF BOOL Output 1 if divide results in overflow OUT INT Output Output value IN_A IN_B Remain INT Output Remainder of the division Note No logic is allowed at the EN input 152 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 18 Encode binary position ENCODE Description The ENCODE function converts the contents of IN to a binary number corresponding to the bit position of the leftmost set bit in IN and returns the result as the function s value If IN is either DW 16 00000001 or DW 16 00000000 a value of 0 is returned If there is logic for EN the output is latched The output changes only when EN is active With logic for EN the ENCODE value is retentive requiring storage and a phase clock 24 23 19 16 15 8 7 3 31 fo offs Jolt of ofofo s fof of ofa sfa ft fol ilil of ofofofs Jojo IN OUT 29 Figure 6 46 Example of ENCODE Most significant bit set is in bit position 29 LAD representation Pa
20. There must be a line disconnect switch or a fuse in the building installation system Load power supplies power supply modules The set rated voltage range must match the local power supply All circuits of the FM 352 5 Any fluctuations in the line voltages or deviations from the rated value must be within the permitted tolerances The following table lists the measures to be taken regarding the 24 V DC power supply Protection against outside electrical influences See also 32 Object Measures Building Outdoor lightning protection Take lightning protection precautions 24 V DC supply cables Indoor lightning protection for example lightning conductors signal lines 24 V DC supply Safe electrical extra low voltage isolation The following table lists the measures to be taken to provide protection against electrical influences or faults Object All plants or systems in which the FM 352 5 is integrated Measure Make sure that the plant or system is connected to a protective conductor for diverting electromagnetic interference Power supply signal and bus lines Make sure that cabling and wiring is routed and installed correctly Signal and bus cables Make sure than any wire or cable break does not result in undefined states in the plant or system eneral technical specifications Page 205 FM 352 5 high speed Boolean processor Operating
21. 206 Technical specifications Dimensions and weights Dimensions W x H x D 80 x 125 x 130 mm Weight Approx 434 g with 1L connection without I O connection or SIMATIC Micro Memory Card Data for specific modules Number of inputs 12 24 V DC 3 RS 422 Number of outputs 8 Voltage Currents Potentials Rated voltage supply to the electronic system 1L 2L 3L 24 V DC class 2 power supply Reverse polarity protection Yes Power failure bypass 5 ms Electrical isolation Between the field side I O card 2L and the encoder card 3L 75 VDC 60 VAC Between the field side I O card 2L and logic 75 VDC 60 VAC Between auxiliary supply 1L and logic 75 VDC 60 VAC Between auxiliary supply 1L and field side of encoder or I O card 2L or 3L 75 VDC 60 VAC Potential differences between M terminals and central ground 75 VDC 60 VAC Insulation tested with 500 VDC Current consumption From input voltage 1L at 20 4 28 8 V Max 150 mA Max 200 mA From input voltage 2L at 20 4 28 8 V From input voltage 3L with 5 2 V or 24 V encoder 600 mA max with encoder supply fully loaded From input voltage 3L at 20 4 28 8 V 200 mA max with no encoder supply load From backplane bus Typically 130 mA FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E0013
22. 4 The Programming tab of the FM 352 5 Properties dialog provides an interface to the programming environment of FM 352 5 see the figure below Use the fields and buttons as described below 1 Specify the number of the application function block that will contain the FM 352 5 program Click the How to create new FB DB set button for information on how to create an FB DB set in your project as a starting point for developing your program Click the Edit Application FB button to call up the STEP 7 LAD FBD editor in which you write your application program For information about writing and testing a program for FM 352 5 refer to the section Programming and Operating the FM 352 5 Module Page 65 Properties FM352 5 RO S4 x General Addresses Programming Parameters m Module Application Function Block number FB 3 Step 1 gt How to create new FB DB set Step 2 gt Edit Application FB Step 3 gt Syntax check Step 4 gt Compile Step 5 gt Download Module Information Cancel Help Figure 5 7 Properties FM 352 5 dialog Programming tab FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Configuring the FM 352 5 module 5 10 Programming the controller 4 After writing your application FB you can click the Syntax check button to check for any syntax errors that are not found by the STEP 7
23. Commutating diodes Commutating diode A Zener Volt lt 40 Single commutating diode Ga Slow reset Zener commutating diode Faster reset 2L Qo Commutating Rel Commutating diodes ays diode Zener Volt lt 40 2M Figure A 9 Application of Commutation Diodes FM 352 5 high speed Boolean processor 224 Operating Manual 05 2011 A5E00131318 04 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes FPGA Resources Used by Instructions A total of 1200 logic modules are available on the FPGA processor as resources Of this total 436 logic modules are the fixed resources used or overhead The following list shows the maximum number of logic modules each operation requires The actual total may be less after the program has been compiled To estimate the size of your program add the fixed resources 436 the encoder selected and the logic modules for each operation in your program The compiler provides an exact utilization percentage at compile time Table A 1 Resources of FPGA Used by Instructions Operation Logic modules Flip flops etc BISCALE 2 CP_GEN 29 POS 2 NEG 2 SR 1 RS 1 Counter CTD16 36 CTU16 31 CTUD16 47 CTUD32 99 Timers TOF 16 26 TOF32 55 TON16 25 TON32 53 TP16 26 TP32 54 Shift register
24. Diagnostics and troubleshooting 8 4 Error correction FM 352 5 high speed Boolean processor 198 Operating Manual 05 2011 A5E00131318 04 Using the FM 352 5 with non S7 masters 9 9 1 Overview Prerequisites for non S7 applications The FM 352 5 module can be used in a non S7 automation system over a PROFIBUS DP I O channel The module is designed to operate as a 16 byte input 16 byte output module when installed in an ET 200M rack The PROFIBUS DP interface is provided by an IM153 1 or IM153 2 module Tools and Prerequisites See also The non S7 automation system must have DP master capability and its configuration tool must be capable of importing the GSD file for the ET 200M The FM 352 5 module must have a SIMATIC Micro Memory Card programmed with STEP 7 The SIMATIC Micro Memory Card must contain SDB 32512 that was created in the STEP 7 environment The user program of the non S7 automation system must manage the data transfer between itself and the module according to the declared interface of the application FB as programmed in STEP 7 The automation system must also perform mode control via the control bytes The following sections provide further details on how to use the FM 352 5 in a third party automation system Installing the configuration programming software Page 45 Page 65 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 199 Using the FM 352 5 with non S7 masters
25. Page nserts a bit into a DINT 32 bits Page Bit shift register length 16 bits Page 159 Bit shift register length 32 bits Page 159 oncatenates 2 WORDs into 1 DWORD Page 160 onverts 1 DWORD into 2 WORDs Page 161 Period measurement 16 bits Page 162 Period measurement 32 bits Page 162 requency measurement 16 bits Page 163 requency measurement 32 bits Page 163 Delete first value 16 bits Page 164 Delete first value 32 bits Page 164 Delete last value 16 bits Page FB number Symbolic name FB 79 ENCODE FB 78 BITSUM FB 93 BitPack_W FB 92 BitPack_DW FB 91 BitCast_W FB 90 BitCast_DW FB 87 BitPick_W FB 86 BitPick_DW FB 95 BitInsert16 FB 94 BitInsert32 FB 89 BitShift_W FB 88 BitShift_DW FB 76 WordPack FB 77 WordCast FB 81 PERIOD16 FB 80 PERIOD32 FB 83 FREQ16 FB 82 FREQ32 FB 97 FIFO16 FB 96 FIFO32 FB 99 LIFO16 FB 98 LIFO32 Delete last value 32 bits Page 136 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 1 Binary scaler BiScale Description The binary scaler FB112 provides a way of producing a series of output pulses at half the rate of the input pulses Each rising edge at input C inverts the output Q effectively dividing the frequency of the input
26. SIMATIC Micro Memory Card The SIMATIC Micro Memory Card stores the program files in non volatile memory The SIMATIC Micro Memory Card is inserted in the slot on the front of the FM 352 5 module A SIMATIC Micro Memory Card with 128 KB 512 KB or 2 MB of storage capacity is required to operate the FM 352 5 module The program files are downloaded from the SIMATIC Micro Memory Card to the FPGA during startup or after a memory reset NOTICE Use a new or reformatted SIMATIC Micro Memory Card If the SIMATIC Micro Memory Card already contains data not associated with an FM 352 5 for example S7 CPU data this can lead to the error message stating that the SIMATIC Micro Memory Card is defective when the FM 352 5 starts Therefore ensure that the SIMATIC Micro Memory Card is new or reformatted before using it in the FM 352 5 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 15 Product overview 1 3 System configurations 1 3 Description 16 System configurations The following figure shows some possible system configurations with the FM 352 5 The control program is developed in the STEP 7 environment with the FM 352 5 configuration software The FM 352 5 module can operate in the following configurations 1 in an S7 system 2 in a stand alone configuration or 3 in a distributed system with an S7 or non S7 master using PROFIBUS communication Programming device or
27. You can select a shift register frame length of 13 bits or 25 bits in the Parameters tab depending on the frame length of your SSI encoder Clock rate You can select a clock rate of 125 kHz 250 kHz 500 kHz or 1 MHz in the Parameters tab dialog based on the capabilities of the encoder the update time required and the length of the cable The maximum clock rate you can select is limited by the length of shielded encoder cable you use e At 125 kHz the maximum cable length is 320 meters e At 250 kHz the maximum cable length is 160 meters e At 500 kHz the maximum cable length is 60 meters e At 1 MHz the maximum cable length is 20 meters For an SSI slave Listen mode clock rate selection is not possible Data shift direction You can select the direction of data to shift left or right in the Parameters tab FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 181 Encoder signals and their evaluation 7 6 SSI absolute encoders Normalization Data Shift Length You can specify the number of bit positions to be shifted within the range of 0 to 12 bits in the Parameters tab Normalization allows the SSI encoder data to be scaled to more convenient units used in the module program SSI mode You can select Master or Listen for the SSI mode Only one module can be a master The Listen mode allows other modules to connect to the same encoder for synchronized control Note In SSI
28. 0 0 0 1 0 0 0 Figure 6 49 Example of BitPack_W and BitPack_DW LAD representation LAD representation Param Data type Address Description BitPack_W BitPack_DW INn BOOL Input Inputs to be JEN ENOL len ENOL constant packed OUT WORD Output Output of o out INO oUm DWORD function IN1 IN1 IN3 IN3 IN4 IN4 IN5 IN5 IN6 IN7 x IN8 IN9 IN10 IN26 IN11 IN27 IN12 IN28 IN13 IN29 IN14 IN30 JIN15 IN31 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 155 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 21 BitCast_W and BitCast_DW Description The BitCast operation is available in two versions a 16 bit FB91 and a 32 bit FB90 version defined by the input WORD or DWORD When the FB is enabled the WORD or DWORD is converted into individual bits BOOL outputs OQUTO OUT15 or OUTO OUT31 OUTO is the LSB and OUT15 or OUT31 is the MSB of IN With logic for EN the BitCast_W or BitCast_DW value is retentive requiring storage and a phase clock 15 8 7 3 0 IN 0 0 1 1 40 1 1 1 0 04 0 0 110 010 O O O O O O O O O O 00 0 0 0 0 U U U U U U U U U U U U U U U U T T T T T T TTT T T FET T T 1 1 1 1 1 1 9 8 7 6 5 4 3 2 10 5 4 3 2 1 0 0 1 0 1 0 0 0 0 0 Figure 6 50 Example of BitCast_W and BitCast_DW LAD representation
29. 5 e Output current Max 250 mA e Time of day interrupts Yes electronic Not protected from application of normal or counter voltage Diagnostics Yes 24 V output power for sensors and encoders e Supply output 3L 1 V max e Output current Max 400 mA e Time of day interrupts Yes electronic Not protected from application of normal or counter voltage Diagnostics Yes 1 Only one of the output power supplies for encoders can be used at a time not both together FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 211 Technical specifications A 2 Technical specitications Status interrupts diagnostics Interrupts Yes e Hardware interrupts e Parameters can be assigned 1L missing Diagnostics data record 2L missing Diagnostics data record 3L missing Diagnostics data record Encoder overload Diagnostics data record Encoder broken wire Diagnostics data record SSI frame error Diagnostics data record Output 2 overload Diagnostics data record SIMATIC Micro Memory Card error Diagnostics data record e Hardware interrupts Yes 8 Hardware interrupts Note Hardware interrupts Alarm N is set on the PROFIBUS after a 24 V input sets Intr x e typ 63 us e Max 200 us Maximum sustained Hardware interrupt rate without Hardware interrupt lost 400 Hz 2 5 ms
30. 6 _ yp 26 Bs zla 2 Es 8 2 RUN Er elie 9 2 J STOP LI LI MRES 10 i 20 2L t ro Ha e 11 n LI Q1 e 12 ck 32 E Q2 E 13 aK 33 Has 7 ra Ea leo Mel O 18 E Q5 18 16 N 36 o as 19 c 17 37 Ha j no E 18 38 MA 7 m e 18 111 m i F 1M a 2M 3M Pag gp 1 Removable terminal strip 2 Wiring diagram on the inside of the front panel door 3 Strain relief mount 4 Removable connection for the 24 VDC module power supply 5 Hinged front panel Figure 4 2 Front connector of the FM 352 5AH11 module outputs high FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 35 Wiring the FM 352 5 4 2 Terminal assignments of the front connector Terminal connector assignment The following table lists all terminals on the left side of the terminal connector pins 1 through 20 and the assignment for each terminal Table 4 1 Terminal connector assignments of terminals 1 through 20 Terminal 1 0 Name Function LED no 1 2M Ground for section 2 I O circuits 2 Input 10 Input Green 3 Input 11 Input Green 4 Input 12 Input Green 5 Input 13 Input Green 6 Input 14 Input Green 7 Input 15 Input Green 8 Input 16 Input Green 9 Input 17 Input Green 10 Note Section 2 I O circuits 11 Output Q0 Sourcing sinking output Green 12 Outp
31. AND double words The WAND_DW word AND double word operation is activated by signal state 1 at the enable EN input and ANDs the two word values at IN1 and IN2 bit by bit The values are interpreted as pure bit patterns The result can be scanned at the OUT output ENO has the same signal state as EN With logic for EN the WAND_DW value is retentive requiring storage and a phase clock Table 6 36 WAND_DW word AND double words LAD representation Parameter Data type Addresses Description EN BOOL Input Enable input ENO BOOL Output Enable output IN1 DWORD Input First value of the logic operation IN2 DWORD Input Second value of the logic operation OUT DWORD Output Result double word of logic operation oe WAND_DW Dout o EN Eom Conn arrDWCon 0 IN1 OUT Conn arrDWCon 1 W 16 FFF IN2 124 Figure 6 25 Example of the WAND_DW Word AND Double Word Instruction The operation is executed if DIn 0 is 1 Only bits O through 11 of Conn arrDWCon 0 are relevant the remaining bits of Conn arrDWCon 0 are masked by the IN2 bit pattern Example Conn arrDWCon 0 01010101 01010101 01010101 01010101 IN2 00000000 00000000 00001111 11111111 Conn arrDWCon 0 AND IN2 00000000 00000000 00000101 01010101 Conn arrDWCon 1 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011
32. The following table lists some of the recommended parts that can be used with the FM 352 5 module The XXXX digits at the end of a part number indicate that the catalog offers several different versions of the part which are identified by different part numbers Table C 3 Recommended Parts for the FM 352 5 Module Part Description Order number SSI encoders RS422 TTL 6FX2001 5XXXX Single ended encoder RS422 TTL 6FX2001 2XXXX Single ended encoder Optical HTL incremental 6FX2001 4XXXX encoder Encoder connector To connect to encoder 12 wire connection pack of 1 6FX2003 0SU12 You can find more information on the Internet at Siemens Industry Automation and Drive Technolog ies Service amp Sur pport ns comiWWiview en 22103021 i Cable Suitable for all encoders 12 wire 200 m other lengths are available refer to your catalog for other part numbers 6FX8008 1BD21 3AA0 Shield contact element Fixing bracket with two bolts for attaching shield terminals to the rail 6ES7390 5AA00 0AAO Terminal element For one cable with a shield diameter of 3 to 8 mm 6ES7390 5BA00 0AA0 Terminal element For one cable with a shield diameter of 4 to 13 mm 6ES7390 5CA00 0AA0 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 249 Parts lists FM 352 5 high speed Boolean processor 250 Operating Manual 05 2011 A5E00131318 04
33. cannot be changed in_out to the elements Static section This definition is position specific The first 8 bits are interpreted as hardware interrupts process interrupts that trigger OB40 You can specify a list of the type BOOL or an array of BOOL but not both You can also assign names 32 0 stat Intr ARRAY 0 7 Resources for module interrupts Upper cannot be can be changed can be changed limit fixed Do not change changed 0 1 stat BOOL can be changed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 231 Technical specifications A 6 Function block declaration table Address Declaration Name Type Comment Static section This definition is position specific These are module status bits Do not change 34 0 stat ST STRUCT Resources for module status bits Upper cannot be cannot be changed limit fixed Do not change changed 0 0 stat FIRSTSCAN BOOL First scan after a change from STOP to cannot be cannot be changed cannot be RUN changed changed 0 1 stat M3L BOOL Power supply for 3L is missing cannot be cannot be changed cannot be changed changed 0 2 stat ESSF BOOL Encoder power supply is overloaded cannot be cannot be changed cannot be changed changed 0 3 stat M2L BOOL Power supply for 2L is missing cannot be cannot be changed cannot be changed changed
34. le OUT DWORD Output Result of shift operation i SHL_DW Dout o EN Eom Conn arrDWCon 0 IN OUT Conn arrDWCon 1 Conn arrWCon 0 N Figure 6 34 Example of the SHL_DW Shift Left Double Word Instruction The SHL_DW box is enabled when 1 is set at Din 0 Conn arrDWCon 0 is loaded and shifted left by the number of bits specified with Conn arrWCon 0 The result is written to Conn arrDWCon 1 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 131 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 28 Description SHR_DW shift right double word The SHR_DW shift right double word operation is enabled by signal state 1 at the Enable EN input The SHR_DW operation is used to shift bits 0 to 31 of input IN bit by bit to the right Input N specifies the number of bit positions to be shifted If N is larger than 32 the command writes a 0 at the OUT output and sets the bits CC 0 and OV in the status word to 0 The same number N of zeros is shifted from the left in order to occupy the positions which have become free The result of the shift operation can be queried at the OUT output ENO has the same signal state as EN With logic for EN the SHR_DW value is retentive requiring storage and a phase clock Table 6 44 SHR_DW shift right double word
35. lt FF label gt S BOOL Input Enables set operation SR R BOOL Input Enables reset operation 4s Qe Q BOOL Output Signal state of output FF label BOOL FF identifier R 6 9 9 Reset set flip flop RS Description This operation is in the standard list of STEP 7 operations You must label each RS operation with a unique element that is declared in the FF structure RS reset set flip flop is reset if the signal state is 1 at the R input and 0 at the S input It is set if the signal state is 0 at the R input and 1 at the S input If the RLO is 1 at both inputs RS is set Table 6 25 Reset set flip flop RS LAD representation Parameter Data type Addresses Description lt FF label gt R BOOL Input Enables reset operation RS S BOOL Input Enables set operation IR Q Q BOOL Output Signal state of output g FF label BOOL FF identifier FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 115 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 10 Description Detect positive edge P This operation is in the standard list of STEP 7 operations P detect positive edge detects a signal change in the lt address gt from 0 to 1 and displays it as RLO 1 after the operation The current signal state in the RLO is compared with the signal state of the address the edge memory bit If the signal state of the address i
36. system The last section describes installation in a stand alone system Installing the mounting rail Horizontal installation of the mounting rail is preferable If you install the mounting rail vertically remember the restrictions on ambient temperature a maximum of 40 C is permitted Project engineering and the mechanical configuration Tools If you want to configure the FM 352 5 module for operation in an S7 300 system keep to the following rules when planning the mechanical installation of your controller system e The maximum number of modules is restricted by the length of the mounting rail and the width of the modules The FM 352 5 takes up 80 mm of space e The number of modules that can be installed to the right of the CPU is limited by the sum of their current consumption from the S7 300 backplane bus The current consumption of the FM 352 5 from the backplane bus is 100 mA e The FM 352 5 can be mounted at any location for I O modules on the rail To install or remove the FM 352 5 module you need a 4 5 mm slotted screwdriver To wire the terminal connector block you need a 3 mm slotted screwdriver FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 27 Installing and removing the FM 352 5 3 2 Installing and removing the FM 352 5 in an S7 300 system 3 2 Installing and removing the FM 352 5 in an S7 300 system Installing the FM 352 5 The description below explains how t
37. 0 4 stat M1L BOOL Power supply for 1L is missing cannot be cannot be changed cannot be changed changed 2 0 stat OVERLOAD ARRAY 0 7 Output x is overloaded cannot be cannot be changed cannot be changed changed 0 1 stat BOOL cannot be cannot be changed changed 4 0 stat END_STRUCT cannot be changed Static section This definition is position specific The Encoder is a structure that has a fixed number of elements The names cannot be changed but the size of Cur_Val and Load_Val must be set to INT or DINT according to which size of encoder is configured 38 0 stat Encoder STRUCT Encoder structure Do not change 0 0 stat Direction BOOL Status Direction 0 counting up 1 counting down 0 1 stat Home BOOL Status 1 encoder is at home position 0 2 stat Homed BOOL Status 1 Home was adopted since power up 0 3 stat Overflow BOOL Status 1 overflow displayed for 1 scan cycle 0 4 stat Underflow BOOL Status 1 Underflow displayed for 1 cycle 0 5 stat SSIFrame BOOL Status SSI frame error or power loss 0 6 stat SSIDataReady BOOL Status 0 SSI encoder has not yet shifted valid data 1 data available 0 7 stat Open_Wire BOOL Status 1 Encoder has open wire 1 0 stat Hold BOOL Hold software input for incremental encoder FM 352 5 high speed Boolean processor 232 Operatin
38. 00 1 Internal error Set for all internal faults 8 x 01 2 External fault Set for all external faults 8 x 02 3 Channel fault 8 x 03 4 Fault in external auxiliary voltage 1L supply missing 8 x 04 6 Module parameters not assigned Parameter data record 0 not received 8 x 06 7 Error in parameter assignment Incorrect parameter mismatch or consistency 8 x 07 check failure if enabled 1 0 3 Type class Always assigned with 8 4 Channel information available 2 0 Incorrect or missing module Set when SIMATIC Micro Memory Card is 8 x 31 missing 2 Operating state STOP Set when not in RUN mode 8 x 32 3 Watchdog tripped Module fault 8 x 33 FM 352 5 high speed Boolean processor 186 Operating Manual 05 2011 A5E00131318 04 Diagnostics and troubleshooting be signaled since the same event has not yet been acknowledged by the user program in the CPU 8 2 Diagnostic messages Byte Bit Meaning Remarks Event no 3 1 Processor failure Processor self test failed 8 x 41 2 EPROM error Flash memory checksum error 8 x 42 3 RAM error RAM test error during startup 8 x 43 6 Hardware interrupt lost Hardware interrupt has been detected and cannot 8 x 46 1 I O and encoder diagnostics inputs and outputs are invalid or off The module goes to STOP 2 The module goes to STOP Assignments of diagnostic data record 1 The first four bytes of diagnostics data record 1 are identical with diagnostics data record 0 Da
39. 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 1 Overview Introduction This section explains how to create and test a program for the FM 352 5 module You will also need to refer to STEP 7 version 5 1 SP2 or higher documentation for the full information on creating programs STEP 7 is the programming environment required to write monitor and test your program Overview of the tasks The following table provides an overview of the order of the tasks necessary to create a program for the FM 352 5 Table 6 1 Creating the Program Creating the control program ajoi Creating an application FB DB see section Creating the application function Vv block Page 67 Assign element names in the declaration section of the FB e Use STEP 7 LAD FBD Editor to write your program in the application FB e Save the program in the STEP 7 editor e Use the Syntax error check button in the FM 352 5 configuration tool Programming dialog tab to check for any syntax errors that are not found by the STEP 7 LAD FBD editor Setting up the interface FB DB in OB1 see section Setting up the interface FB DB Page 93 Testing the application program see section Debugging a program Page 101 e Download program to S7 CPU S7 314 or higher e Use STEP 7 to monitor the FB as it executes NIN e Save the application FB as part of the CPU project FM 352 5 hig
40. 11111111 Conn arrDWCon 1 Conn arrDWCon 0 XOR IN2 01010101 01010101 01010101 01010101 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 23 Description 6 9 Instruction Set for LAD Programming SHRI shift right 16 bit integer The SHR_I shift right 16 bit integer operation is activated by signal state 1 at the Enable EN input The SHR_I operation is used to shift bits O to 15 of input IN bit by bit to the right Bits 16 to 31 are not affected Input N specifies the number of bit positions to be shifted If N is greater than 16 the command operates as if N 16 was set The bit positions shifted in from the left to fill vacated bit positions are assigned the signal state of bit 15 sign bit of the integer This means these bit positions are assigned 0 if the integer is positive and 1 if the integer is negative The result of the shift operation can be queried at the OUT output ENO has the same signal state as EN With logic for EN the SHR_I value is retentive requiring storage and a phase clock Table 6 39 SHR_I shift right 16 bit integer LAD representation Parameter Data type Addresses Description SHR EN BOOL Input Enable input lEN ENO ENO BOOL Output Enable output IN INT Input Value to be shift
41. 16 or 32 bits OUT All data types Output Destination address of the value with a length of specified at the IN input 8 16 or 32 bits 6 9 7 Convert integer 16 bits to double 32 bits integer I_Dl Description This operation is in the standard list of STEP 7 operations _DI reads the content of the IN parameter as an integer 16 bits and converts it to a double integer 32 bits The result is output by the OUT parameter Table 6 23 Convert integer 16 bits to double 32 bits integer _Dl LAD representation Parameter Data type Addresses Description IN INT Input Integer value 16 bits to convert OUT DINT Output Result Double integer 32 bits FM 352 5 high speed Boolean processor 114 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 8 Set reset flip flop SR Description This operation is in the standard list of STEP 7 operations You must label each SR operation with a unique element that is declared in the FF structure SR set reset flip flop is set if the signal state is 1 at the S input and 0 at the R input SR is reset if the signal state is 0 at the S input and 1 at the R input If the RLO is 1 at both inputs SR is reset Table 6 24 Set reset flip flop SR LAD representation Parameter Data type Addresses Description
42. 33 Example of the SHR_W Shift Right Word Instruction The SHR_W box is activated when 1 is set at DIn 0 Conn arrWCon 0 is loaded and shifted right by the number of bits specified with Conn arrWCon 1 The result is written to Conn arrWCon 2 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 27 Description 6 9 Instruction Set for LAD Programming SHL_DW shift left double word The SHL_DW shift left double word operation is enabled by signal state 1 at the Enable EN input The SHL_DW operation is used to shift bits O to 31 of input IN bit by bit to the left Input N specifies the number of bit positions to be shifted If N is higher than 32 the command writes a 0 at the OUT output The same number N of zeros is shifted from the right in order to occupy the positions which have become free The result of the shift operation can be queried at the OUT output ENO has the same signal state as EN With logic for EN the SHL_DW value is retentive requiring storage and a phase clock Table 6 43 SHL_DW shift left double word LAD representation Parameter Data type Addresses Description SHL DW EN BOOL Input Enable input lEN ENo ENO BOOL Output Enable output IN ourl IN DWORD Input Value to be shifted N WORD Input Number of bit positions to be shifted
43. Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Control byte 1 Reserved Reserved Reserved Reserved Operating mode Control byte 2 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved Status byte 1 Reserved BUSY Reserved Reserved Operating state Status byte 2 Reserved Reserved Reserved Reserved Reserved SIMATIC Micro Memory Card status This bit indicates that the module is not ready for data transfer or other operations and will not update I O or diagnostics Table 9 4 Bit Definitions of the Control and Status Bytes Bits Command to module Bits Module reaction Operating mode Operating state 0000 Continue current normal operation 0001 Normal mode STOP 0001 Normal mode STOP 0010 Normal mode RUN 0010 Normal mode RUN 0101 Test mode STOP outputs off 0101 Test mode STOP 0110 Test mode RUN 0110 Test mode RUN 1010 Single scan mode 1010 Single scan mode SCAN once 1000 Single scan mode no change idle SIMATIC Micro Memory Card status 000 SIMATIC Micro Memory Card OK 001 SIMATIC Micro Memory Card not found 010 SIMATIC Micro Memory Car d program defective or invalid 011 SIMATIC Micro Memory Card program missing 100 SIMATIC Micro Memory Card program corrupt 111 SIMATIC Micro Memory Card and data record 0 128 do not match applies to S7 masters only If the singl
44. DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 125 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 22 Description Table 6 38 WXOR_DW word Exclusive OR double words WXOR_DW word Exclusive OR double words The WXOR_DW word Exclusive OR double words operation is activated by signal state 1 at the enable EN input and XORs the two word values at IN1 and IN2 bit by bit The values are interpreted as pure bit patterns The result can be scanned at the OUT output ENO has the same signal state as EN With logic for EN the WXOR_DW value is retentive requiring storage and a phase clock LAD representation Parameter Data type Addresses Description WXOR_DW EN BOOL Input Enable input EN ENOL ENO BOOL Output Enable output ac ou IN1 DWORD Input First value of the logic operation IN2 DWORD Input Second value of the logic operation ne OUT DWORD Output Result double word of logic operation oe WXOR_DW Dout o EN ENO _ Conn arrDWCon 0 IN1 OUT Conn arrDWCon 1 W 16 FFF IN2 126 Figure 6 27 Example of the WXOR_DW Word Exclusive OR Double Word Instruction The operation is executed if DIn 0 is 1 Example Conn arrDWCon 0 01010101 01010101 01010101 01010101 IN2 00000000 00000000 00001111
45. Enabling the Diagnostics Interrupts The Hardware Configuration dialog provides a Parameters tab where you can select which diagnostics you want to enable You also select whether the module will trigger diagnostics interrupts and or hardware interrupts FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 185 Diagnostics and troubleshooting 8 2 Diagnostic messages Responses to a Diagnostics Interrupt If an event occurs that can trigger a diagnostic interrupt the following happens e The diagnostic information is stored in data records 0 1 and 128 e The SF error LED lights up e The diagnostics interrupt OB is called OB82 e The diagnostic data record 0 is entered in the start information of OB82 If OB82 has not been programmed the CPU changes to STOP Reading the Data Record from the Module The diagnostic data record 0 is automatically transferred to the start information when the diagnostics OB is called These four bytes are stored in bytes 8 to 11 of OB82 Data record 0 reports module level diagnostics Assignments of diagnostic data record 0 The following table shows the assignments of diagnostic data record 0 in the start information All unlisted bits are insignificant and take the value zero Table 8 3 Assignments of diagnostic data record 0 Byte Bit Meaning Remarks Event no 0 0 Error on module Is set at each diagnostic event 8 x
46. FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 141 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library 6 10 6 Description Up counter CTU16 You can count up with CTU16 FB121 The counter is incremented by 1 on a rising edge at the CU input If the count value reaches the upper limit of 32767 it is no longer incremented Each subsequent rising edge at the CU input no longer has an effect Signal state 1 at the R input resets the counter to the value 0 regardless of the value currently at the CU input The Q output indicates whether the current counted value is greater than or equal to the preset value PV Table 6 53 Up counter CTU16 LAD representation Parameter Data type Addresses Description CU BOOL Input Counter input R BOOL Input Reset input R is dominant over CU PV INT Input constant Preset value Refer to parameter Q for the effect of PV Q BOOL Output Status of the counter Q has the following value e 1ifCV2PV e Oin all other situations CV INT Output Current count value possible value 0 to 32767 142 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 7 Description Down counter CTD16 6 10 Operations in the FM 352 5 Library You can count down with CTD16 FB122 The counter is decremented by 1
47. FM 352 5 module 0 eeececeeeeeeeeeeeeeeeeeeeeeaeeeeeeaeeeeeeaeeeeeeaeeeesenaeeeeseaas 102 6 6 Stand alone Operation sssrinin sites anestigeckeeGantdcnediarnesteeedens dees RE aa Ea aiei ieai Ei aan 6 7 Controlling dynamic parameters ssesssrrarrer ana EE 106 6 8 Memory TUNCHONS S eriei a EEEE A EE 6 9 Instruction Set for LAD Programming ssessssrinrinaini nannaa anaana aAA AARNA RAN ANAN KAANAA NA ARNa 6 9 1 normally opem Mputa aaa aa aia a 6 9 2 normally closed IMPUb siisii a d a a a 6 9 3 QUIT UE COl odnoni aa a aa aaa a a a 6 9 4 NOT ar S E ee e a a A e coree trometer eer 6 9 5 Midline Output GonNect T ssiaiseiiini oiai aa aaa a aaa iaa aal 6 9 6 MOVE saniiieanni ananena aaa E aides E EAA A a AA O E A 6 9 7 Convert integer 16 bits to double 32 bits integer I_DI ce eecceeeeeeeeeeeeeeeteeeeeeeteeeeeeneeeeee 114 6 9 8 S t reset PROP SRR aaa a A a dee eae 6 9 9 Reset Set flip flop IRS preron ana feta ceceeud neues dis aedes faanpeendcisedeeu aed hanedeaaaee 6 9 10 Detect positive edge P essccecccteseetsseteeeeceeeteneeceetenecuee teeeeeetenedeeetencedoetaneudae annae annaa nna teas 6 9 11 Detect negative edge N oi eeeeceeeeeeeeeeeeeeeeeeeeeeeeeeesaeeeeeseeeeeeseeeeeeseeaeeseeneaeeeseaaees 116 6 9 12 Detect signal positive edge POS occ cececeeeeeeeeeeeeeeeeeeeseeeeeeeseeeeeeseneeeeeseeeaeeeseeeaeeeseaeess 6 9 13 Detect negative signal edge NEG ec eeeeceeeeeeeeeeeeeeeeeeteeeeeeeseeeeeeeseneeeeeseeeaeee
48. If an interrupt is triggered and the corresponding OB is not loaded the CPU changes to STOP refer to the Programming with STEP 7 manual You can enable interrupt servicing as follows 1 Enabling general interrupts for the entire module Select the module in HW Config Using the menu command Edit gt Object Properties gt Parameters tab gt Basic Parameters Enable interrupt generation and choose the appropriate interrupt Select the folder for enabling process interrupts and enable check mark those process interrupts events that are appropriate Save and compile the hardware configuration Download the hardware configuration to the CPU 2 Click on the Program tab compile the FM application and then download to the FM 352 5 Lost Hardware Interrupts If the processing of a hardware interrupt is not yet completed in the hardware interrupt OB the module registers all subsequent hardware interrupt events If an event occurs again before the hardware interrupt can be triggered the module triggers the hardware interrupt lost diagnostic interrupt FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 191 Diagnostics and troubleshooting 8 3 Interrupts Evaluation of a Hardware Interrupt If a hardware interrupt is triggered by the FM 352 5 the following information is available in the double word variable OB40_POINT_ADDR LAD STL FBD 0840 318_FM352_5_Ex
49. Input Variable in which bits are counted OUT INT Output Value output Error information This function does not detect any error states DIn O 0 BITSUM DOut 0 EN ENO Not DW 16 12345678 IN OUT Conn arrlCon 0 OUT W 16 000D Figure 6 48 Example of the Sum Number of Bits Function If the signal state of input DIn 0 is 1 activated the BITSUM function is executed In this example the value output in Conn arrlCon 0 is 13 D in hexadecimal notation This is the number of bits set to 1 in the hexadecimal double word input DW 16 12345678 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor 154 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 20 BitPack_W and BitPack_DW Description The BitPack operation is available in two versions as a 16 bit FB93 and a 32 bit FB92 version defined by the destination WORD or DWORD When the FB is enabled the BOOL inputs INO IN15 or INO IN31 are packed to form a WORD or a DWORD INO is the LSB and IN15 or IN31 is the MSB of OUT With logic for EN the BitPack_W or BitPack_DW value is retentive requiring storage and a phase clock Oo 0 0 141 10 141 11 0 00 1 0 0 0 Pototo toto toto toto oto to btobtotot NN N N NNN NN NNN NN NWN 1 1 1 1 1 1 9 8 7 65 4 3 2 10 WLLL ELL 15 8 7 3 0 olo ol1 4 1 00 1 1 1
50. LAD FBD editor such as the use of operations that are not supported by the FM 352 5 module Any errors that are found by this syntax check must be corrected before you can successfully compile the application FB 5 After testing the program for the FM 352 5 on the S7 CPU or in S7 PLCSIM you are ready to compile it into an executable format for the FM 352 5 module Click the Compile button to create an SDB formatted specifically for the FM 352 5 module Note This special SDB is created from a combination of the application FB and the static parameters If you make any changes to the static parameters those not in parameter assignment data record 1 or any changes to the application FB you will need to recompile Changes made to parameter assignment data record 1 dynamic parameters do not require the FM 352 5 program to be recompiled but the changed hardware configuration must be downloaded to the S7 CPU 6 Click the Download button to transfer the SDB from the STEP 7 programming environment to the FM 352 5 module 7 You can use the Module Information button to view diagnostic and other information about the module when STEP 7 is set to online mode after the program has been downloaded to the FM 352 5 module FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 63 Configuring the FM 352 5 module 5 10 Programming the controller 64 FM 352 5 high speed Boolean processor Operating Manual
51. LAD representation Param Data type Address Description BitCast_W BitCast_DW IN WORD Input Input to be len ENO EN ENO DWORD constant converted OUTn BOOL Output Output of function IN OUTO IN OUTO OUT1 OUT1 OUT2 OUT2 OUT3 OUT3 OUT4 OUT4 OUT5 gt OUT5 OUT6 m OUT7 A e OUT8 gt OUT9 OUT10 OUT26 OUT11 OUT27 OUT12 OUT28 OUT13 OUT29 OUT14 OUT30 OUT15 OUT31 156 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 22 BitPick_W and BitPick_DW Description The BitPick operation is available in two versions a 16 bit FB87 and a 32 bit FB86 version defined by the input WORD or DWORD When the FB is enabled the selected bit within the input WORD or DWORD is transferred to OUT If SELECT is 0 then the LSB of the input WORD or DWORD is transferred to OUT If SELECT is 15 or 31 then the MSB of the input WORD DWORD is transferred to OUT If there is logic for EN the output is latched The output changes only when EN is active With logic for EN the BitPick_W or BitPick_DW value is retentive requiring storage and a phase clock SELECT 3 OUT 1 Figure 6 51 Example of BitPick_W and BitPick_DW LAD representation LAD representation Param Datatype Addresses Description BitPick_W
52. None diagnostic interrupts hardware None interrupts diagnostic and hardware interrupts Reaction to PLC STOP Stop continue Stop Input filter time constants Delays of 0 5 10 15 20 50 microseconds and 1 6 milliseconds delay see following section for more information about input filtering 0 microseconds Stand alone operation under Program properties Module stops with standalone module can be operated standalone Module stops with standalone Encoder type selection No encoder SSI encoder symm 5 V incremental encoder RS 422 single sided 24 V incremental encoder HTL No encoder interface SSI encoders SSI shift register length 13 bits 25 bits 13 bits e Clock rate 125 kHz 250 kHz 500 kHz 1 MHz 125 kHz Delay time monoflop 16 32 48 64 microseconds Delay 64 us Data shift direction Left right Left e Data shift 0 to 12 bits number of bit positions by 0 bits which data is shifted in the specified direction e SSI mode Master listen Master 56 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Configuring the FM 352 5 module 5 7 Selecting diagnostic parameters Parameters 5 V and 24 V encoders Range of values Default Signal evaluation Pulse amp direction x1 x2 x4 Pulse direction e Counter type Continuous periodic or single Continuous e Coun
53. Output diagnostics Interrupts for outputs QO to Q7 Enable disable Disabled individually enabled Hardware interrupts Hardware interrupts 0 to 7 Enable disable Disabled individually enabled The FM 352 5 module can have an output ON time of less than 5 us To allow the FPGA to be able to respond to an output overload by setting the diagnostic bit the pulse duration of the output ON time must be greater than 2 ms FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 55 Configuring the FM 352 5 module 5 7 Selecting diagnostic parameters Selecting Configuration Parameters The following table provides a list of the configuration parameters that can be set on the FM 352 5 module These are static parameters that specify how the module operates Note These parameters are included in the module consistency check The hardware configuration on the PLC and the hardware configuration in the SIMATIC Micro Memory Card of the FM 352 5 module must match to achieve a positive consistency check result After having made any changes to the static parameters or to the application FB you must recompile the data to generate the correct consistency see chapter hecking the consistency of program and configuration Page 48 Table 5 3 Configuration parameters static Parameters Range of values Default Interrupt generation Enable disable Disabled Interrupt selection
54. Parameter Data type Addresses Description IN BOOL Input Start input PT INT DINT Input constant Duration of the pulse in 10 ps units PT must be a positive constant Q BOOL Output Status of the time ET INT DINT Output Elapsed time Note No logic is allowed at the EN input 138 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 3 Description 6 10 Operations in the FM 352 5 Library On delay timers TON16 and TON32 This timer is available in two versions As a 16 bit FB117 and a 32 bit FB114 timer TON16 and TON32 delay a rising signal edge by the time PT A rising edge at the IN input causes a rising edge at output Q after the time PT has expired Q then remains set until the IN input changes to 0 again If the IN input changes to 0 before the time PT has expired output Q remains set to 0 The ET output provides the time that has passed since the last rising edge at the IN input Its maximum value is the value of the PT input ET is reset when the IN input changes to 0 Signal states 0 PT ET Time Figure 6 43 Timing Diagram for On Delay Timer TON Table 6 50 On Delay Timer TON LAD representation Parameter Data type Addresses Description TON IN BOOL Input Start input lEN ENO PT INT DINT Input constant Length of the on delay in 10 us units PT must be a positive constant N
55. RUN When set to zero the module changes to STOP mode even if the selector on the module is in the RUN position OneScan BOOL When set to 1 this bit enables the single scan mode As long as this input is 1 the module will execute one scan cycle each time the Run input changes from zero to one When set to zero the module follows the Run input LADDR_In DINT Logical address of the FM 352 5 inputs It must match the address assigned to the inputs in the hardware configuration LADDR_Out DINT Logical address of the FM 352 5 outputs and must match the address assigned to the outputs in hardware configuration CPU_Out POINTER Points to the 14 byte structure which is the source for the data to be transferred to the module as CPU outputs The structure should match the structure defined in the application FB CPU_In POINTER Points to the 14 byte structure which is the destination for the data to be transferred from the module as CPU inputs The structure should match the structure defined in the application FB Error BOOL This bit is set if the module is configured for testing and called in normal mode or vice versa Detailed information can be found in the Status parameter Status INT This parameter contains the status word output by the module see section User data interface Page 201 heading Definitions of the Control Bytes and Status Bytes AppFB Block_FB The number of the application FB for th
56. SHIFT 18 SHIFT2 18 SHIFT4 18 SHIFT8 19 SHIFT 16 21 SHIFT32 29 SHR_I 36 SHR_I_U 36 SHR_DI 88 SHR_DI_U 87 ROL_DW 81 ROL_DW_U 80 SHL_DW 81 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 225 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes 226 Operation Logic modules SHL_DW_U 80 SHL_W 35 SHL_W_U 34 SHR_DW 81 SHR_DW_U 81 SHR_W 34 SHR_W_U 34 FIFO32 19 FIFO16 19 LIFO32 21 LIFO16 21 BitShift_DW 17 BitShift_W 19 Arithmetic operations FMABS16 18 FMABS32 37 FMAdd16 9 FMAdd32 17 FMDIV16 86 FMDIV32 153 FMMUL16 62 FMMUL32 118 BITSUM 21 BITSUM_U 21 ENCODE 19 ENCODE_U 19 Data transmission MOVE latched 17 MOVE_U unlatched 0 DatSel16 8 DatSel32 16 WordPack 17 WordPack_U 0 WordCast 17 WordCast_U 0 BitPick_DW 10 BitPick_DW_U 10 BitPick_W 5 BitPick_W_U 5 BitCast_DW 17 BitCast_DW_U 0 BitCast_W 9 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes Operation Logic modules BitCast_W_U 0 BitPack_DW 17
57. SSI Excoder i33 EK 34 Fotr high speed 20v hipit dr a 35 encodes or H sensors he Twisted pair Figure A 4 Function Block Diagram of the Encoder Card for module FM 352 5AHx1 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 217 Technical specifications A 4 Operating data A 4 Operating data Switching Frequency Derating Charts The following figure shows how the output channels are derated by the operating temperature as the switching frequency increases up to 100 kHz at an output load of 500 mA Output load 500 mA C 70 60 50 40 Ambient operating temperature 0 20 40 60 80 100 kHz Switching frequency in kHz of the active channels other channels off or isolated 1 channel 2 channels 4 channels eens 8 channels Figure A 5 Switching Frequency and Ambient Temperature at 500 mA Output Load FM 352 5 high speed Boolean processor 218 Operating Manual 05 2011 A5E00131318 04 Technical specifications A 4 Operating data The following figure shows how the output channels are derated for maximum load current as the switching frequency increases up to 100 kHz at 60 C operating temperature Operating temperature 60 C mA 600 500 400 300 200 Maximum load current 100 0 20 40 60 80 100 kHz Switching frequency in kHz of the active channels other channels off or isolated 4channels a 8 channels Figure A 6
58. Setting parameters for FM 352 5 modules e Programming FM 352 5 modules e Operating the modules e Troubleshooting and diagnostics Related documentation For more information on installing and programming FM 352 5 Boolean processor modules refer to the documentation on the SIMATIC S7 300 automation system and the STEP 7 programming software CD ROM The entire electronic manuals are also available on CD ROM as the SIMATIC Manual Collection Standards certificates and approvals The FM 352 5 fulfills the requirements and criteria of IEC 1131 Part 2 and the requirements for the CE mark The following approvals apply FM Class I Div 2 Groups A B C D and cULus Class Div 2 Groups A B C D FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 3 Preface Recycling and disposal The FM 352 5 has low pollutant content and can therefore be recycled For environmentally compliant recycling and disposal of your discarded device please contact a company certified for the disposal of electronic waste Structure of the manual The following tools will help you to find specific information e At the front of the manual you will find a detailed table of contents and lists of the figures and tables the manual contains e The chapters themselves are divided into sections that are introduced by titles indicating the content of the sections following e At the back of the manual you will find
59. Switching Frequency and Maximum Output Current at 60 C FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 219 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes A 5 Switching frequency for inductive loads without commutating diodes Maximum Inductor Energy Rating The energy contained in the inductance of the relay will damage the FM 352 5 output if the destruction limit is exceeded The energy is proportional to the inductance of the relay and the current through the relay Determining the Inductive Load Characteristics If you do not know the characteristics of your inductive load use this procedure to estimate them If you know Rand Z you can resolve to 7 with the equation 7 L R To determine the characteristics of an unknown load measure the relay steady state On current at 24 V Measure 7 the time that the current requires when the relay is on to reach 63 2 of the On value R 24 V and L 7 R Example First assume on on current of 100 mA Then assume relay current rise time 7 from 0 to 63 of 100 mA 63 mA is 2ms 2 ms L R Resolved to R 24 0 1 240 ohms Resolved to 0 002 240 480 mH FM 352 5 high speed Boolean processor 220 Operating Manual 05 2011 A5E00131318 04 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes Reading Graph 1 To determine if the energy stored
60. application FB The figure below shows four additional operations from the STEP 7 catalog that can be used for the FM 352 5 The conversion operations _DI INV_I INV_DI and the MOVE operation Program elements Se Converter aj Deer I_B FT Io BCD FEDECO DI_A FT Inv RT NEG_ 4 Counter 6 DB call g Jumps 21 Integer fct 8 Floating point fet Move FT MOVE ar Program control Move functions MOWE Zd F dee eee 1 You can use the _DI INV_I INV_DI and the MOVE operations from the STEP 7 catalog Figure 6 2 Valid conversion and move operations from STEP 7 for the FM 352 5 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 79 Programming and operating the FM 352 5 6 2 Creating the application function block The following figure shows the shift rotate operations from the STEP 7 catalog that are valid for the FM 352 5 Overviews xj oof New network Gig Bit logic H Q Comparator H 3 Converter H E Counter 08 DB call G Jumps H E Integer Function H E Floating point fct H A Move HSA Program control EE Shift Rotate ff SHR_I H Timers H E word logic H E FB blocks FC blocks fq SFB blocks H E SFC blocks Program elements B Call structure Figure 6 3 Valid shift rotate operations from STEP 7 for the FM 352 5 FM 352 5 high speed Boolean processor 80 Operating Manual 05 2011 A5E00131318 04 Programming and o
61. be changed can be changed 0 1 in BOOL can be changed 2 0 in T1_PV DINT Some can be DINT can be changed can be changed DINT must start at 2 6 or 10 6 0 in T2_PV BYTE Some can be BYTE must be can be changed can be changed mapped to INT by the MOVE operation 7 0 in CmpByte BYTE can be changed can be changed 8 0 in Ci_PV INT 5ome can be INT INT must start can be changed can be changed at an even byte boundary 10 0 in CP_Period WORD some can be WORD can be changed can be changed 12 0 in CMPInt INT Total structure length must be 14 can be changed can be changed bytes 14 0 in END_STRUCT cannot be changed Note Data is consistent only over long word boundaries 4 bytes To ensure data consistency a 32 bit double integer DINT element must start at 2 6 or 10 70 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 Assigning Output Elements 6 2 Creating the application function block Use the output section of the declaration table to assign the output elements of the module to be used in the program as shown in the table below These involve the physical outputs of the module and the 14 byte structure that is used by the CPU user program for the outputs of the FM 352 5 module Table 6 3 Example declaration table for the application FB o
62. bit logic instructions contacts and coils and some additional operations come from the standard operations of STEP 7 The FM 352 5 specific function blocks are available in the FM 352 5 Library STEP 7 operations for the FM 352 5 The following table lists the symbolic names and descriptions of the STEP 7 operations available for the FM 352 5 Note The status word is not available and is not updated by the FM 352 5 Table 6 16 STEP 7 operations for the FM 352 5 Symbolic name Description I_DI onvert integer 16 bit to double integer 32 bit Page SR Setreset flip flop Page 115 RS Resetse fipslop Page 115 Py Detect positive RLO edge Page 16 AN Detect negative RLO edge Page 116 WAND W AND word operation Page 121 WOR_W OR word operation Page 122 WXORW Exclusive OR word operation Page 125 WAND_DW AND double word operation Page 124 WOR_DW OR double word operation Page 125 WXOR DW Exclusive OR double word operation Page 126 SHL_W Shift lft word operation Page 128 SHR W Shift right word operation Page 130 FM 352 5 high speed Boolean processor 110 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming Symbolic name Description SHL_DW Shit eft double word operation Page 191 SHR OW Shit ri
63. by unchecking the System Selection check box The Start box can then be edited Properties FM352 5 RO S4 x General Addresses Programming Parameters Inputs Start 256 Process Image Partition Hardware interrupt triggers End 20 No JO OB 1 40 EF Gee 7 Process Image Partition Part Process Image No oH System Selection 1 Clear the checkbox to allow the start address to be changed with CPUs that support address selection Figure 5 4 Properties FM 352 5 dialog Addresses tab FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 53 Configuring the FM 352 5 module 5 6 Assigning properties and parameters Assigning module parameters 3 The Parameters tab provides a hierarchical view of the different functions and diagnostics of the FM 352 5 module for which you can parameterize the operating states see the figure below The following parameters are involved and are described in the following tables e Enabling module diagnostics e Enabling output diagnostics e Enabling hardware interrupts e Selecting input filter times e Encoder parameters and others Expand each folder in the left column to display the available parameter options The column on the right changes as required to match the selected parameter You assign parameters by selecting one of the available options You can resize the columns in
64. check program operation and wiring Table 9 2 User Data Input and Output Bytes in Test Mode Byte address Output data to module Input data from module 0 Control byte 1 Status byte 1 1 Control byte 2 Status byte 2 2 Digital outputs 0 7 Digital inputs 0 7 3 Digital inputs 8 14 4 5 Power supply status 6 SSI status 7 Output overload 8 SIMATIC Micro Memory Card status 9 10 Encoder status 1 11 Encoder control Encoder status 2 12 Encoder load value MSB Encoder data MSB 32 bit 13 Encoder load value Encoder data 14 Encoder load value Encoder data MSB 16 bit 15 Encoder load value LSB Encoder data LSB FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 201 Using the FM 352 5 with non S7 masters 9 3 User data interface Definitions of the Control Bytes and Status Bytes The control and status bytes are defined in the following table The control bytes allow your program to control the operation of the module RUN STOP or single scan The status bytes allow your program to determine the status of the module as well as the status of the SIMATIC Micro Memory Card inserted in the module The following table defines the bit patterns for each of the operating modes the operating status conditions and the SIMATIC Micro Memory Card status Table 9 3 Control Bytes and Status Bytes for the FM 352 5 Byte Bit 7 Bit 6
65. compliment 32 bit double integer INV_DI The INV_DI operation reads the content of the IN parameter and performs a EXCLUSIVE OR function with the hexadecimal mask W 16 FFFF FFFF This operation changes every bit to its opposite state ENO always has the same signal state as EN With logic for EN the INV_DI value is retentive requiring storage and a phase clock Table 6 32 Generate one s compliment 16 bit double integer INV_DI LAD representation Parameter Datatype Addresses Description INV DI EN BOOL Input Enable input JEN ENO ENO BOOL Output Enable output IN DINT Input Double integer input value SIN OUT 32 bits OUT DINT Output Ones complement of the 32 bit integer IN Din 0 INV_DI DOut 0 Conn arrDICon 0 Figure 6 21 EN IN ENO nor OUT Conn arrDICon 1 Example of the INV_DI Instruction If Din 0 1 each bit of Conn arrDICon 0 is inverted for example Conn arrDICon 0 FOFF FFFO becomes Conn arrDICon 1 OF00 OOOF Output DOut 0 is 1 if the inversion is not performed ENO EN 0 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 17 Description WAND_W word AND words 6 9 Instruction Set for LAD Programming The WAND_W AND words operation is activated by signal state 1 at the enable EN input and ANDs the two word valu
66. following figure shows the structure of the FB labeled _Debug that is used to call the application FB in test mode FM test instance _Debug EN ENO 10 0 Run Error M2 0 10 1 OneScan Status MW20 L 256 LADDR_In L 256 LADDR_Out DB5 DBBO CPU_Out DB6 DBBO CPU_In FB3 AppFB DB3 ApplinstDB The OneScan input only works in Normal mode Figure 6 14 Interface FB to execute the Test mode FM 352 5 high speed Boolean processor 94 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 3 Setting up the interface FB DB data flow in test mode In test mode the S7 CPU executes all programs so that you can use the various program monitoring and testing capabilities of STEP 7 to test your application program The FM 352 5 module operates in a pass through mode making its inputs and outputs directly available to the S7 CPU The following figure shows the flow of input and output data between OB1 the application FB with its instance DB and the FM 352 5 module inputs and outputs over the Test interface FB when the Test interface FB is called by OB1 S7 CPU FM 352 5 Input range Inter face 4 from Module 0 15 Inputs Outputs Encoder data Diagnostics Process interrupts Output range Setting Application Application OB1 FB DB FB _ gt Module inputs ii Program TOLD CP
67. hardware configuration s assssisesiisiisauinidranidin nainii aani aaia aaa 49 5 5 Setting up the hardware configuration ccc cceeeeeeeeeeeeeeeeeeeeeeeeeeeeeteeeeeeeseeeeeeeseneaeeeseeeaeeeseeneees 50 5 6 Assigning properties and parameters ccccccecceceeeeecceeeeeeeeeeeeaeeeeeeeeeseeeeaeeeeeeeeesecennieeeeeeeentee 5 7 Selecting diagnostic parameters cc ccccceeceeeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeseeeeeeseeeeeeeseeeaeeeseneaeeesenaeees 55 5 8 SEISCUNG input e S sessa ates ee iued weears aut aude detach enn eee ade ee eee ed 59 5 9 Saving and compiling the hardware Configuration cccceeeeeeeeeseeeeeeeeeeeeeseeeeeeeseeeeeeeeenaees 5 10 Programming the contiolle essers ssi a vues gee EE EE G cleared FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 7 Table of contents Programming and operating the FM 352 5 ccssssssssssssssssssssssssnsssssssssssssssssssssssssssssssssssssessssssreseees 65 6 1 CDV CVI ais ceased vce he valid ncn cd ed ce ede ce dt bed case eee bated 65 6 2 Creating the application function block 2 0 0 2 2c ce eeeceeceeec cece ee eeeeeeeeaeeeeeeeteseceaaaeeeeeeeeesessnneeeeeeeeteeea 6 3 Setting up the interface FB DB ccccsccscssesesssssesseesessesseesessssesssesessnssessnsetssnseteenseusansntenseeeen 93 6 4 Debugging a progra visccc ce sceccctencceecesatace ces i Een covanade cevanace ces A E 101 6 5 Download program to
68. in the inductor can be handled by the FM 352 5 module without commutation diodes refer to the following figure Example With the values determined from the inductive load characteristics relay current 100 mA and relay inductance 480 mH follow the vertical line from 100 mA up to the 0 5 H line This is well below the switching limit line Note that an inductor of up to 2 H is acceptable at 100 mA If the inductor had been larger than 2 H or the current had been greater than 200 mA then commutation diodes are required parallel to the relay There is no special inductive switching limitation if commutation diodes are used The following diagram shows the maximum relay inductance dependent of the inductor current Maximum rated inductance and inductor current 100 00 H 10 00 H 1 00 H Maximum relay inductance 0 10 H 0 01 H 10 mA 100 mA 1000 mA es anand Switching threshold Destruction limit Figure A 7 Graph 1 Maximum Rated Inductance and Inductor Current FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 221 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes Maximum Inductive Switching Rate Once you have determined that your inductive load can be switched by the FM 352 5 you must also verify that you can switch it at the maximum rate that you require Energy must be absorbed by the FM 352 5 output each time that the inductor is switched
69. off For this reason there is a maximum thermal limit for the rate that an inductive load can be switched Refer to Graph 2 for this limit Reading Graph 2 To determine the maximum rate that the FM 352 5 will switch the load refer to the following figure Follow the L R 2 ms line horizontally to the 100 mA limit line The thermal maximum switching rate of 50 Hz is the cross point for L R 2 ms and 100 mA If a higher switching rate is required then commutation diodes will be required There is no limitation of the FM 352 5 as to switching rate if commutation diodes are used Graph 2 is valid for the FM 352 5 switching inductive loads without commutating diodes all I O loaded to the rated maximum at 60 C The diagram shows L R in milliseconds depending on the maximum switching rate Temperature limit for inductive loads 100 00 ms eee eee he x s 7 N s N ah Ys iee N 10 00 ms ii 4 x Gs oS in g Ts 8 SQ D s 2 1 00ms y E t z S z z fy a F y cg Frl N L wd va 0 10 ms e u lt hj 5 x E 1 ne 0 01 ms _________ _ H hH o ttt 0 Hz 1 Hz 100 Hz 1000 Hz Maximum switching rate 1 L R 6 a Curr
70. on a rising edge at the CD input If the count value reaches the lower limit of 32768 it is no longer decremented Any subsequent rising edge at the CD input no longer has an effect Signal state 1 at the LOAD input sets the counter to the preset value PV regardless of the value currently at the CD input The Q output indicates whether the current counted value is less than or equal to 0 Table 6 54 Down counter CTD16 LAD representation Parameter Data type Addresses Description CTD16 CD BOOL Input al input IEN ENo Load BOOL Input Load input LOAD input is dominant over CD e am PV INT Input constant Preset value The counter is preset Load CV to PV when the signal level at the _ py LOAD input is 1 Q BOOL Output Status of the counter Q has the following value e 1ifCV lt 0 e Oin all other situations CV INT Output Current count value possible value 32768 to 32767 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 143 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library 6 10 8 Up down counters CTUD16 and CTUD32 Description The CTUD counter is available in two versions As a 16 bit FB123 and a 32 bit FB120 up down counter The count value is changed by a rising edge as follows e The counted value is incremented by 1 on a rising edge at the CU input If the count value reaches the up
71. operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 14 Multiply double 32 bit integer FMMul32 Description FMMul32 multiplies the integer value 32 bits at the IN_A input by the integer value at the IN_B input and writes the result to the OUT output The DONE output signals that the result is available The valid range for inputs IN_A IN_B and for the OUT output is 2 147 483 648 to 2 147 483 647 The OVF output is set to logic 1 if an overflow occurs otherwise it is logic 0 Table 6 61 Multiply double 32 bit integer FMMul32 LAD representation Parameters Data type Addresses Description FMMul32 REQ BOOL Input Enables the multiply operation on a 0 to 1 change It must remain 1 until ie ENO F DONE i OSPA alah REQ DONE terminates IN A OVF IN_A DINT Input Input value A IIN B OUT IN_B DINT Input Input value B DONE BOOL Output 1 result is available OVF BOOL Output 1 if multiplication results in overflow OUT DINT Output Output value IN_A x IN_B Note No logic is allowed at the EN input FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 149 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library 6 10 15 Description 150 Multiply 16 bit integer FMMul16 Table 6 62 Multiply 16 bit integer FMMul16 FMMul16 multiplies the 16 bit integer value at the IN
72. operation is in the standard list of STEP 7 operations You must label the M_BIT input with a unique element that is declared in the Edge structure POS detect positive signal edge compares the signal state of lt address gt with the signal state from the previous scan cycle that is stored in M_BIT If the current RLO state before the operation is 1 and the state of the lt address gt bit is 1 and the previous state of the bit was 0 detection of rising edge the RLO bit will be 1 after this operation Table 6 28 Detect signal positive edge POS LAD representation Parameters Data type Addresses Description lt Address gt Q BOOL Output One shot output POS lt Address gt BOOL Input Scanned signal Q M_BIT BOOL Edge abe Edge memory bit that stores the previous signal state of lt address gt M_BIT 6 9 13 Detect negative signal edge NEG Description This operation is in the standard list of STEP 7 operations You must label the M_BIT input with a unique element that is declared in the Edge structure NEG detect negative signal edge compares the signal state of lt address gt with the signal state from the previous scan cycle that is stored in M_BIT If the current RLO state before the operation is 1 and the state of the lt address gt bit is 0 and the previous state of that bit was 1 detect negative edge the RLO bit will be 1 after this operation Table 6 29 Detect negative si
73. pulse TON32 FM 352 5 library 32 bit on delay timer TOF 32 FM 352 5 library 32 bit off delay timer TP16 FM 352 5 library 16 bit pulse TON16 FM 352 5 library 16 bit on delay timer TOF16 FM 352 5 library 16 bit off delay timer CP_Gen FM 352 5 library Clock pulse generator CTUD32 FM 352 5 library 32 bit up down counter CTUI6 FM 352 5 library 16 bit up counter CTD16 FM 352 5 library 16 bit down counter CTUDI6 FM 352 5 library 16 bit up down counter SHIFT FM 352 5 library Bit shift register 1 bit maximum length 4096 SHIFT2 FM 352 5 library Bit shift register 2 bits maximum length 2048 SHIFT4 FM 352 5 library Bit shift register 4 bits maximum length 1024 SHIFT8 FM 352 5 library Bit shift register 8 bits maximum length 512 SHIFT16 FM 352 5 library INT shift register maximum length 256 SHIFT32 FM 352 5 library DINT shift register maximum length 256 FMABS32 FM 352 5 library Absolute value 32 bits FMABS16 FM 352 5 library Absolute value 16 bits DatSel32 FM 352 5 library Data selector 32 bits DatSet16 FM 352 5 library Data selector 16 bits FMAdd32 FM 352 5 library Add 32 bits FMAdd16 FM 352 5 library Add 16 bits FMSub32 FM 352 5 library Subtract 32 bits FMSub16 FM 352 5 library Subtract 16 bits FMMul32 FM 352 5 library Multiply 32 bits FMMul16 FM 352 5 library Multiply 16 bits FMDiv32 FM 352 5 library Divide 32 bits FMDiv16 FM 352 5 library Divide 16 bits ENCODE FM 352 5 library Locates most significan
74. rules and regulations have to be followed depending on where the device is to be used This chapter provides an overview of the most important rules to remember and keep to when integrating the FM 352 5 in a plant or system Specific applications Keep to the safety and accident prevention regulations applying to specific applications for example the directives on machines Emergency stop devices Emergency stop devices complying with IEC 204 which corresponds to DIN VDE 113 must remain effective in all the operating modes of the plant or system Startup of the system after specific events The following table lists the measures to be taken when the system starts up after the occurrence of certain events Situation Startup following drop or failure of the power supply Restart of the FM 352 5 following an interruption of bus communication Measure Dangerous operating states must not occur If necessary force an emergency stop Restart after release of the emergency off device No uncontrolled or undefined restart must be possible FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 31 Wiring the FM 352 5 4 1 General rules and regulations Line voltage 24 V DC supply The following table lists the measures to be taken regarding the line voltage Object Permanently installed plants or systems without all pole line disconnect switches Guidelines
75. siemens er eC FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 69 Programming and operating the FM 352 5 6 2 Creating the application function block Assigning Input Elements Use the input section of the declaration table to assign the input elements to be used in the program as shown in the table below These include the physical inputs of the module and the 14 byte structure used by the CPU user program for the inputs of the FM 352 5 module Table 6 2 Example of a declaration table for the application FB input section as in STEP 7 V5 1 Address Decl Name Type Comment Input section This input is position specific The first 15 bits are digital inputs of the FM 352 5 You can specify a list of type BOOL or an array of BOOL but not both You can also assign names to the inputs 0 0 in Din ARRAY 0 14 Digital inputs 0 11 24 V cannot be changed can be changed can be changed 12 14 RS 422 differential 0 1 in BOOL can be changed Input section Bytes 2 through 15 are position specific data from the CPU for the FM 352 5 module Any combination of BOOL array of BOOL BYTE WORD INT or DINT that totals 14 bytes is allowed You can assign names to the inputs 2 0 in CPU_Out STRUCT 14 bytes from the CPU as inputs for cannot be changed cannot be changed the FM 0 0 in Bits ARRAY 0 15 5ome can be Boolean can
76. speed Boolean processor 50 Operating Manual 05 2011 A5E00131318 04 Configuring the FM 352 5 module 1 2 3 4 Figure 5 2 5 5 Setting up the hardware configuration Click the catalog button if the hardware catalog does not appear when you first open HW Config A table that provides details of each module placed in the selected rack such as order numbers network addresses input and output addresses etc A blank station window in which you can place racks and insert modules into appropriate slots A hardware catalog that contains all the S7 components needed to set up a programmable controller system Hardware configuration Inserting an S7 300 station Follow the steps outlined below to insert a SIMATIC S7 300 station Oo a BF OO N gt Expand the SIMATIC 300 object in the hardware catalog Expand the RACK 300 folder Select an appropriate rack for your application Double click on the rack or drag it to the station window Select and insert an appropriate power supply module from the PS 300 folder Select and insert an appropriate CPU from the CPU 300 folder Inserting an FM 352 5 module Follow the steps outlined below to insert the FM 352 5 module in a SIMATIC S7 300 station Ale Expand the FM 300 folder in the hardware catalog 2 Expand the FM Processors folder 3 4 Select a valid slot in the rack and double click on the module in the catalog or drag the Select the FM 352
77. store the data that must be consistent The data must be transferred to the module then the control bit must be set to store the data The control bit can be edge detected POS to reduce the number of cycles needed for the transfer You can use such a handshake as follows 1 Set the control bit to 0 2 Write the data 3 Read the reflected control bit which must be looped back in the user program and wait for 0 4 Set the control bit to 1 the FM application program must store the data on this edge 5 Read the reflected control bit and wait for 1 The interface is now ready for the sequence to repeat Updating the Instance Data Block The instance data block DB of the application FB contains the data elements required by the FB to execute the program in test mode If you make certain changes to the FB declaration section such as adding or deleting multiple instances of an operation then the DB no longer matches the FB When the CPU executes the FB in test mode the CPU may go to STOP mode if access errors occur as a result of the mismatch To update the DB so that it will match the changes made to the FB follow the steps outlined below 1 Delete the existing instance DB belonging to the modified FB 2 Select the menu command Insert gt S7 Block gt Data Block right click and select the command Insert New Object gt Data Block in the context menu 3 In the Properties dialog that appears enter the same number
78. that of connector 6FX2003 0CE12 for encoders 6FX2001 2xxx Figure 4 4 Pin assignment of the incremental encoder cable for 24 V encoders HTL The following figure shows the pin assignments for an SSI encoder cable available from Siemens and the corresponding connections to the front connector on the FM 352 5 for the SSI absolute encoder interface The last four characters of the order number specify the cable length 6FX5002 2CA12 0xx0 gt Terminal connections SSI encoder cable on the FM 352 5 module Terminal Signal Color SSI master SSI listen 2 CLS 22 CK 28 B 1 CLS 33 CK 29 B 3 DAT 26 D r 26 D 4 DAT 27 D m o D 8 Count direction 24 DC 5V 24 DC 5V 11 P encoder _ 25 DC 24V 25 DC 24V 12 M encoder 5 23 3M 23 3M Enclosure Outer shield Shield contact Shield contact element element The pin assignment of the encoder connector corresponds with that of connector 6FX2003 0CE12 for encoders 6FX2001 2xxx Figure 4 5 Pin assignment for the SSI encoder cable for SSI encoders FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Wiring the FM 352 5 4 4 Connecting encoder cables The SSI encoder interface can support a maximum of one master and one listen module Note Supply your encoder with 5 V DC or with 24 V DC from the FM 352 5
79. that property damage can result if proper precautions are not taken NOTICE indicates that an unintended result or situation can occur if the relevant information is not taken into account If more than one degree of danger is present the warning notice representing the highest degree of danger will be used A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage Qualified Personnel The product system described in this documentation may be operated only by personnel qualified for the specific task in accordance with the relevant documentation in particular its warning notices and safety instructions Qualified personnel are those who based on their training and experience are capable of identifying risks and avoiding potential hazards when working with these products systems Proper use of Siemens products Trademarks Note the following WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation If products and components from other manufacturers are used these must be recommended or approved by Siemens Proper transport storage installation assembly commissioning operation and maintenance are required to ensure that the products operate safely and without any problems The permissible ambient conditions must be complied with The information in the relevant docume
80. the module can become a stand alone CPU as long as stand alone operation is enabled in the configuration software and no I O backplane bus is detected During stand alone operation the following functions are not supported e Diagnostic and process interrupts SF LED is illuminated for diagnostic faults if this function is enabled in the hardware configuration on the SIMATIC Micro Memory Card e CPU_In data including status e CPU_Out data including control all access to CPU_Out data is interpreted as 0 Executing the Program At startup the FPGA reads the image of the FB stored on the SIMATIC Micro Memory Card card and can execute the program if the mode selector on the module is set to RUN mode see figure below FM 352 5 Inputs Module Programmed SIMATIC Micro Memory Card Outputs Module Figure 6 18 Stand alone operation FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 105 Programming and operating the FM 352 5 6 7 Controlling dynamic parameters 6 7 Controlling dynamic parameters Using System Function 55 to Write Dynamic Parameters With SFC55 WR_PARM write parameters you can modify the dynamic parameters in data record 1 and transfer them to the FM 352 5 module These parameters take effect when SFC 55 is called The parameters transferred to the module do not however overwrite the parameters of the module in the corresponding SDB if they exist there After t
81. the FB that was stored in the SIMATIC Micro Memory Card Any time power to the system is lost or interrupted the FPGA program is lost When power is restored the FPGA again reads the program from the SIMATIC Micro Memory Card The following figure shows the flow of input and output data between OB1 and the FM 352 5 module inputs and outputs over the interface FB The interface FB transfers CPU_Out data from the CPU to the module and CPU_In data from the module to the CPU SIMATIC Micro Memory Card FM 352 5 Inputs S7 CPU Module Interface lt FB CPU_Out Output CPU_Out range 14 data bytes 2 control bytes CPU_In 14 data bytes 2 status bytes gt Outputs Module Figure 6 17 Data Exchange in Normal Mode FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 97 Programming and operating the FM 352 5 6 3 Setting up the interface FB DB Interface FB parameters The following table lists the parameters of the interface FB and describes their functions Enter the addresses for the module inputs and outputs and the pointers to the data structures that are exchanged between the CPU and the module Table 6 10 Interface FB Parameter Definitions Parameters Data type Definition Run BOOL When set to 1 this bit requests the module to change to RUN mode If the mode selector on the module is also in the RUN position and the OneScan input is set to 0 then the module changes to
82. the FM 352 5 module 5 9 Saving and compiling the hardware configuration 5 9 Saving and compiling the hardware configuration Saving the Configuration After you have selected and configured the module parameters and the diagnostic functions you save the configuration To save the FM 352 5 configuration parameters follow the steps outlined below 1 Click OK in the FM 352 5 Properties dialog 2 Click the Save and Compile button or use the menu command Station gt Save and Compile in hardware configuration see figure below 3 Download the compiled module configuration to the S7 CPU by clicking on the Download to Module button or use the menu command PLC gt Download to Module in hardware configuration as shown in the following figure EL HW Config SIMATIC 300 Station Edit Insert PLC View Options Window Help Deer s 2 sel Se E a a CPU 315 1 Click Save and Compile or select the Station gt Save and Compile menu command 2 Then download the hardware configuration to the S7 CPU Figure 5 6 Saving and compiling the hardware configuration FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 61 Configuring the FM 352 5 module 5 10 Programming the controller 5 10 Description 62 Programming the controller After completing the configuration steps described in the previous sections you are now ready to start preparing your FM 352 5 program
83. the module execution mode to Normal by writing the value 1 to the M0 0 address in the VAT_1 table The interface FB for normal operation sends a Run command to the module You can monitor the same program execution in normal mode as described in Monitoring program execution in test mode above Note In Normal mode FB3 is executed on the FM module not on the S7 CPU Consequently you will not be able to monitor the execution of FB3 using STEP 7 s display of signal flow in the logic block or using other monitoring functions FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 25 Getting started 2 2 Running the FM 352 5 sample program FM 352 5 high speed Boolean processor 26 Operating Manual 05 2011 A5E00131318 04 Installing and removing the FM 352 5 3 3 1 Installation rules Planning the mechanical installation If you want to operate the FM 352 5 module in an S7 300 system you can find detailed information on the mechanical installation and project engineering in the Operating Instructions SIMATIC S7 300 CPU 31xC and CPU 31x Installation http support automation siemens com WW view en 13008499 This chapter simply contains additional information Refer also to the design quidelines regarding lightning protection in section Protection Circuit for FM 352 5 Boolean Processor Page 243 The remainder of this section and the following section deal with installation in an S7 300
84. this dialog by moving the cursor to a position between the column headings The following figure shows how to assign parameters Properties FM352 5 RO S4 x General Addresses Programming Parameters Parameters amp Parameters 2 9 Basic Parameters Interrupt generation Interrupt selection Reaction to CPU STOP E Module Diagnostics Enable Missing Auxiliary supply voltage 1L Missing input output supply voltage 24 Encoder sensor supply fault Missing encoder supply voltage 3L SSI frame overrun Differential encoder broken wire MMC diagnostic HO Output Diagnostics Enable O Process Interrupt Enable HO Input Filter Time Constants Hg Program Properties HO Encoder General HO Encoder SSI OK Cancel 1 Click in field to display a list of parameter options 2 Click a check box to enable or disable each parameter or diagnostic interrupt Figure 5 5 Properties FM 352 5 dialog Parameters tab FM 352 5 high speed Boolean processor 54 Operating Manual 05 2011 A5E00131318 04 Contiguring the FM 352 5 module 5 7 Description 5 7 Selecting diagnostic parameters Selecting diagnostic parameters The following table provid
85. with the user program of the CPU when using a coprocessor configuration The S7 CPU has access to 16 bytes of input and 16 bytes of output data to permit transfer of control information counted values counter preset values and status information using a special Interface FB Function Block to coordinate the data exchange see figure above FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 13 Product overview 7 2 Physical features of the module 1 2 Physical features of the module Elements on the front The following figure shows the status indicators on the front of the FM 352 5 module SF SSVI ooo om0 O 0007o 110 111 18 8 amp G9OD OOODAONONAN AO 5 m 24V Status LEDs for output voltage 2 Status LEDs for inputs outputs 3 Status LEDs for 24 V encoders or digital inputs 4 Removable terminal strip 5 Removable connector for the 24 VDC module power supply 6 Hinged front panel 7 Three position switch fo
86. 0 0 Faulty module Set for all errors Check DRO byte 0 bit 1 3 for Use the STEP 7 or FM 352 5 The red SF LED is on _ fror entries diagnostics tools to analyze the for all errors FM 352 5 is in STOP mode Problem Note Diagnostic interrupts must be enabled before they can be reported 0 1 Internal error Set for any internal The error is caused by a Use the STEP 7 or FM 352 5 error program or parameter diagnostics tools to analyze the assignment error problem FM 352 5 is in STOP mode 0 2 xternalerror Set for any external The error is external to the Use the STEP 7 or FM 352 5 error not reported by FM 352 5 and there is no diagnostics tools to analyze the channel channel data problem 0 3 Channel error Set for any channel The error is external and Use the STEP 7 or FM 352 5 error confined to a channel of diagnostics tools to analyze the FM 352 5 problem 0 4 No external 1L supply missing The 24V input to the FM 352 5 The 24V supply or the wiring auxiliary The green DC5V LED 1L terminal is not present or is that connects to the FM 352 5 voltage is off below specified minimum 1L terminal is bad voltage The voltage is not 20 4 to 28 8 The FM 352 5 has detected V at the 1L terminal that there is no power on the The terminals are not screwed S7 300 backplane tight Note This diagnostics interrupt The terminal strip is not seated must be enabled before it can correctly be tepoliee The S7 300 ba
87. 11101010 101 h The released digits are assigned the Ai signal state of the three bits shifted out Figure 6 39 Example of Bit Shifts for the ROR_DW Rotate Right Double Word Instruction Din 0 ROR_DW DOut 0 EN ENO _ Conn arrDWCon 0 IN OUT Conn arrDWCon 1 Conn arrWCon 0 N Figure 6 40 Example of the ROR_DW Rotate Right Double Word Instruction The ROR_DW box is enabled when 1 is set at DIn 0 Conn arrDWCon 0 is loaded and rotated to the right by the number of bits specified with Conn arrWCon 0 The result is written to Conn arrDWCon 1 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 Operations in the FM 352 5 Library Overview The following table lists the FBs from the FM 352 5 Library their symbolic names and includes a functional description of each You can change the numbers of the FBs after you have copied them or as you copy them to the Blocks folder of your program Table 6 47 FBsin the FM 352 5 library FB number Symbolic name Description FB 112 BiScale Page FB 116 TP16 16 bit pulse Pa
88. 1318 04 Technical specifications A 2 Technical specitications Voltage Currents Potentials Power loss of the module Typically 6 5 W Data for selecting sensors Input voltage e Rated value 24 VDC For signal 1 11 V to 30 V For signal 0 30Vto5V Input current e For signal 1 Typically 3 8 mA e For signal 0 lt 1 5mA Input frequency Max 200 kHz Hardware input delay Max 3 us Selectable input delay times None 5 us 10 us 15 us 20 us 50 Us 1 6 ms Minimum pulse duration for program response 1 us 5 us 10 us 15 us 20 us 50 us 1 6 ms Cable length sensors 100 meters unshielded 600 meters shielded Shielded cable is recommended when less than 1 6 ms filtering is selected Minimum pulse duration max SW counter 1 us 200 kHz frequency Connection of two wire BEROs Possible Permitted bias current Off idle Max 1 5 mA On Min 3 2 mA 1 The input delay filter is a noise pulse filter It may not reject a continuous wave of 1 delay Data for selecting an actuator 5AH01 current sinking output Output voltage e For signal 1 Max M 0 5 V Output current e At signal 1 Nominal value 0 5A Permitted range 5 mA to 0 6 A e For signal 0 discharge current Max 1 0 mA Total current of the outputs Max 4 A Output delay for resistive load For 1 to 0 Max 3 2 ps Typically 1 7 us
89. 352 5 module 3L 24 V External voltage supply a 5V PE gt 24V CLK Bus Encoder 3 interface card 7 L i FPGA 4 P Bus Compact 8 controller 7 wa iT I O card Power SIMATIC Micro supply Memory Card 2 interface Power supply 1 SIMATIC Micro Memory Card 1L 24 V 2L 24 V External External Voltage supply Voltage supply Figure A 1 Functional Block Diagram of the FM 352 5 Module FM 352 5 high speed Boolean processor 214 Operating Manual 05 2011 A5E00131318 04 Technical specifications A 3 Block diagram on NSRO eran cana Sonne STEDEN ONSEN SEENE IIASA RITARA Engithighspeed 24v hpit Egit2iv igi speed higi sid 12A01pit ANVIdNOVE LLHYS ZSENJ Figure A 2 Function Block Diagram of the I O Card for module FM 352 5AH11 0AE0 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 215 Technical specifications A 3 Block diagram Eigithigh speed Uvs 12AOIpIE ANVIdNOVE LOHYS ZSENH Figure A 3 Function Block Diagram of the I O Card for module FM 352 5AH01 0AE0 FM 352 5 high speed Boolean processor 216 Operating Manual 05 2011 A5E00131318 04 Technical specifications A 3 Block diagram 2E MDMA tor Eacoder av horeme tal Encoder i31 FM 352 5 BACKPLANE i32 K gs SSlokek onpet For
90. 5 You can specify a list of inputs 0 0 in Din ARRAY 0 14 Digital inputs 0 11 24 V cannot be can be changed can be changed 12 14 RS 422 differential changed 0 1 in BOOL can be changed Input section Bytes 2 through 15 are position specific data from the CPU to the FM 352 5 module Any combination of BOOL Array of BOOL BYTE WORD INT or DINT which total 14 bytes is allowed You can assign names to the inputs 2 0 in CPU_Out STRUCT 14 bytes from the CPU as inputs to the cannot be cannot be changed FM changed 0 0 in Bits ARRAY 0 15 5ome can be Boolean can be changed can be changed 0 1 in BOOL can be changed 2 0 in T1_PV DINT Some can be DINT can be changed can be changed DINT must start at 2 6 or 10 6 0 in T2_PV BYTE Some can be BYTE must be mapped can be changed can be changed to INT by the MOVE operation 7 0 in CmpByte BYTE can be changed can be changed 8 0 in C1_PV INT Some can be INT INT must start at can be changed can be changed an even byte boundary 10 0 in CP_Period WORD Some can be WORD can be changed can be changed 12 0 in CMPInt INT Total structure length must be 14 bytes can be changed can be changed 14 0 in END_STRUCT cannot be changed FM 352 5 high speed Boolean processor 230 Operating Manual 05 2011 A5E00131318 04 Technical specificatio
91. 5 Boolean processor module module to a valid slot in the S7 300 station FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 51 Configuring the FM 352 5 module 5 6 Assigning properties and parameters 5 6 Assigning properties and parameters Opening the Properties dialog 52 After the FM 352 5 module has been placed in a valid slot of the S7 300 station you need to configure the module by assigning certain properties and parameters Double click on the FM 352 5 module entry This opens the Properties dialog that contains four tabs for assigning properties and parameters 1 The General tab displays the basic identification and descriptive information see the figure below You can also use this dialog to enter comments Properties FM352 5 RO S4 Eg General Addresses Programming Parameters 1 Short Designation FM 352 5 High Speed Boolean Processor 12DI 8DO Encoder Order No 6ES7 352 5AHO0 0AEO Name FM 352 5 Comment Figure 5 3 Properties FM 352 5 dialog General tab FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Configuring the FM 352 5 module 5 6 Assigning properties and parameters Setting Input and Output Addresses 2 The Addresses tab displays the address assignments for the inputs and outputs as set by the system see the figure below You can change these addresses
92. 5 library Converts a WORD to 16 digital bits BitCast_ DW FM 352 5 library Converts a DWORD to 32 digital bits BitPick_W FM 352 5 library Selects a bit from a WORD BitPick_DW FM 352 5 library Selects a bit from a DWORD Bitinsert16 FM 352 5 library Inserts a bit into an INT 16 bits Bitinsert32 FM 352 5 library Inserts a bit into a DINT 32 bits BitShift_W FM 352 5 library Bit shift register length 16 bits BitShift DW FM 352 5 library Bit shift register length 32 bits WordPack FM 352 5 library Concatenates 2 WORDs into 1 DWORD WordCast FM 352 5 library Converts 1 DWORD into 2 WORDs 240 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Technical specifications A 7 Valid operations for FM 352 5 module Operation PERIOD 16 Tanks containers FM 352 5 library Description Period measurement 16 bits PERIOD32 FM 352 5 library Period measurement 32 bits FREQ16 FM 352 5 library Frequency measurement 16 bits FREQ32 FM 352 5 library Frequency measurement 32 bits FIFO16 FM 352 5 library Delete first value 16 bits FIFO32 FM 352 5 library Delete first value 32 bits LIFO16 FM 352 5 library Delete last value 16 bits LIFO32 FM 352 5 library Delete last value 32 bits FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 241 Technical specifications A 7 Valid oper
93. 63 Divide double 32 bit integer FMDiv32 LAD representation Parameters Datatype Address Description FMDiv32 REQ BOOL Input Enables the Divide operation ona 0 to 1 change It must nl a remain 1 fil DONE i REQ DONEr otherwise divide terminates INA OVF IN_A DINT Input Dividend N B OUTK IN_B DINT Input Divisor 7 Remain DONE BOOL Output 1 result is available OVF BOOL Output 1 if divide results in overflow OUT DINT Output Output value IN_A IN_B Remain DINT Output Remainder of the division Note No logic is allowed at the EN input FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 151 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library 6 10 17 Divide 16 bit integer FMDiv16 Description FMDiv16 divides the 16 bit integer value at the IN_A input by the integer value at the IN_B input and writes the result to the OUT output and the remainder to the Remain output The DONE output signals that the result is available The valid range for the IN_A input is 2 147 483 648 to 2 147 483 647 The valid range for input IN_B and outputs OUT and Remain is 32768 to 32767 The output OVF is set to logic 1 if an overflow occurs otherwise it is 0 When OVF is 1 the OUT and Remain outputs are set to 0 Table 6 64 Divide 16 bit integer FMDiv16 LAD representation FMDiv16 EN ENO
94. 92 2XX10 OAA0 Front panel I O terminal connector To cover wiring terminals Front panel 24 V power supply To cover external power connector FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 247 Parts lists Accessory Components for the FM 352 5 248 The following accessories are required to operate the FM 352 5 module Table C 2 Accessory Components for the FM 352 5 Part 40 pin front connector Description For input and output signals to the module Order number Screw in contacts 6ES7392 1AM00 0AA0 Spring loaded contacts 6ES7392 1BM01 0AA0 SIMATIC Micro Memory Card For non volatile program and configuration data storage required by the module for program execution You can use SIMATIC Micro Memory Card with 128 KB 512 KB and 2 MB The specified order numbers represent the state as of January 2011 128 KB 6ES7953 8LG20 0AA0 512 KB 6ES7953 8LJ20 OAA0 2 MB 6ES7953 8LL20 0AA0 1 For FM 352 5 modules delivered prior to 2008 there are restrictions as to the use of the most recent SIMATIC Micro Memory Cards You can find more information about this on the Internet at Siemens Industry Automation and Drive Technologies Service amp Support http support automation siemens com WW view en 25393901 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Parts lists
95. A5E00131318 04 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 21 WOR_DW word OR double words Description The WOR_DW word OR double word operation is activated by signal state 1 at the enable EN input and ORs the two word values at IN1 and IN2 bit by bit The values are interpreted as pure bit patterns The result can be scanned at the OUT output ENO has the same signal state as EN With logic for EN the WOR_DW value is retentive requiring storage and a phase clock Table 6 37 WOR_DW word OR double words LAD representation Parameter Data type Addresses Description WOR DW EN BOOL Input Enable input lEN ENo ENO BOOL Output Enable output lige om IN1 DWORD Input First value of the logic operation IN2 DWORD Input Second value of the logic operation lee OUT DWORD Output Result double word of logic operation a WOR_DW Dout o EN Eom Conn arrDWCon 0 IN1 OUT Conn arrDWCon 1 W 16 FFF IN2 Figure 6 26 Example of the WOR_DW Word OR Double Word Instruction The operation is executed if DIn 0 is 1 Bits O to 11 are set to 1 the remaining Conn arrDWCon 0 bits are not changed Example Conn arrDWCon 0 01010101 01010101 01010101 01010101 IN2 00000000 00000000 00001111 11111111 Conn arrDWCon 0 AND IN2 01010101 01010101 01011111 11111111 Conn arrDWCon 0
96. AAN 6 9 29 ROL_DW rotate left double Word 2 eee ee ceeeeeeeeeeeeeeeeeeeeeeteeeeeeeseeeeeeseeeeeeeseeeeeeeseeaeeeeeeaees 6 9 30 ROR_DW rotate right double Word 00 0 ee cece eee eeeeeeeeeeeeeeeteeeeeeseaeeeeeseeeeeeeseeeaeeeeeeaeeeseeaaees 6 10 Operations in the FM 352 5 Library eceeeeeeeeeeeeeeeeneeeeeeeneeeeeeaeeeeesaeeeeesneeeeetiaeeeeesnieeeeess 6 10 1 Binary scaler BISCAIC 22 c ccceeccsseccevsaedecet ccnescececnacccuvanaseectcasedeascnpeecetcnaeceatsnavecdbensecetcanpeeeetanse 137 6 10 2 Pulse timers TP16 and TP32 cccccceceeceeeeeceeseeceeeeeceaeeeeaaeseceeeseaeeesaeeseaeeseeeeeseaeeesiaeeeeeeesas 6 10 3 On delay timers TON16 and TON32 6 10 4 Off delay timers TOF16 and TOF32 6 10 5 Clock pulse generator CP_Gen cecccceeeecceeceeeeeeeeeaeeeeaaececeeeseaeceseaeeeeaeeseeeeseaeeesnaeeeeeeeeas 6 10 6 Up counter CTU16 eeeccecccceceeeceeeeeeeeeeeceaaeeeeeeeseaeeecaaeessaaeseeeeeseaeseseaeeseaeeseeeeesceeesieeseeseeesas FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Table of contents 610 7 DOWN c unter CUB VG sirncgacncnisisinnsdiissiamatibineitierenmadertatnaidapasieaiiansalntaniiaiauabnali nia 143 6 10 8 Up down counters CTUD16 and CTUD32 00 0 ee cence ee enne eect etree ee eaeeeeeeaaeeeeeeaeeeeeeaeeeeneaas 6 10 9 Bit shift Registers SHIFT SHIFT2 SHIFT4 SHIFT8 SHIFT16 and SHIFT32 6 10 10 Absolute value FMABS32 and FMABS16 cce
97. BitPack_DW_U 0 BitPack_W 9 BitPack_W_U 0 BitInsert32 33 BitInsert32_U 32 BitInsert16 17 BitInsert16_U 16 Encoder selected Encoder 16 bit 64 Encoder 32 bit 117 SSI master 13 bit 61 SSI master 25 bit 100 SSI listen 16 bit 77 SSI listen 32 bit 122 None 0 Comparator CMP16_EQ 6 CMP16_GE 8 CMP16_GT 8 CMP16_LE 8 CMP16_LT 8 CMP16_NE 6 CMP32_EQ 11 CMP32_GE 25 CMP32_GT 25 CMP32_LE 25 CMP32_LT 25 CMP32_NE 11 Type conversion _DI I_DI_U 0 INV_DI 17 INV_DI_U 0 INV_I INV_I_U Logical operations AND 1 OR 1 XOR 1 Word logic operations FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 227 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes 228 Operation Logic modules WAND_W 9 WAND_W_U 8 WAND_DW 17 WOR_DW_U 16 WOR_W 9 WOR_W_U 8 WOR_DW 17 WOR_DW_U 16 WXOR_DW 17 WXOR_DW_U 16 WXOR_W 9 WXOR_W_U 8 Miscellaneous FREQ32 71 FREQ16 51 PERIOD32 43 PERIOD16 23 INT 6 gt INT 8 gt INT 8 lt INT 8 lt INT 8 lt gt INT 6 DINT 11 gt DINT 25 gt DINT 25 lt DINT 25 lt DINT 25 lt gt DINT 11 Operation has memory and uses one clock phase U unlatched not retentive FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Technical specifica
98. BitPick_DW IN WORD Input Input from which ENO EN ENO DWORD constant the bit is selected SELECT INT Input Bit position to be OUT OUT constant selected within IN SELECT SELECT OUT BOOL Output Output of function FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 157 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 23 Bitinsert Description The BitInsert operation is available in two versions a 16 bit FB95 and a 32 bit FB94 version defined by the input WORD or DWORD When the FB is enabled the selected bit within the input WORD or DWORD is replaced all other bits are transferred with no change If SELECT is 0 then the LSB of the input WORD or DWORD is replaced by BIT If SELECT is 15 or 31 then the MSB of the input WORD DWORD is replaced by BIT If there is logic for EN the output is latched The output changes only when EN is active With logic for EN the BitInsert value is retentive requiring storage and a phase clock SELECT 3 15 8 7 3 0 m Loto t fol s sfofofofo s jofo o our Lofol fols Jo ofolofolfofolo Figure 6 52 Example of Bitlnsert LAD representation LAD representation Param Datatype Addresses Description IN INT DINT Input Input from which constant the bit is BitInsert16 BitInsert32 selected EN ENO EN ENO SELECT INT Input Bit position to IN O
99. CTUD32 32 bit up down counter FB120 can be changed can be changed can be changed 102 0 stat TmrP 1 TP32 32 bit timer FB113 can be changed can be changed can be changed 120 0 stat TmrOn1 TON32 32 bit timer FB114 can be changed can be changed can be changed 138 0 stat TmrOf1 TOF32 32 bit timer FB115 can be changed can be changed can be changed 156 0 stat TmrP2 TP16 16 bit timer FB116 can be changed can be changed can be changed 170 0 stat TmrOn2 TON16 16 bit timer FB117 can be changed can be changed can be changed 184 0 stat TmrOf2 TOF 16 16 bit timer FB118 can be changed can be changed can be changed 198 0 stat SReg1 SHIFT Shift registers FB124 to FB127 can be changed can be changed can be changed 718 0 stat SReg2 SHIFT2 can be changed can be changed can be changed 1238 0 stat BiS BiScale 2 1 binary scaler FB112 can be changed can be changed can be changed 1244 0 stat Clk50 CP_Gen Pulse generator FB119 can be changed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 233 Technical specifications A 6 Function block declaration table Address Static section This can use any combination of BOOL or Array of BOOL Declaration Name definition is not position specific You ca Type Comment n change the names inside the structure except for FF You
100. DI Converter Convert integer 16 bit to double integer 32 bit MOVE MOVE Assign a value INVI Converter Generate one s compliment for 16 bit double integer INV_DI Converter Generate one s compliment for 32 bit double integer WAND_W Word logic operation AND word operation WOR_W Word logic operation OR word operation WXOR_W Word logic operation Exclusive OR word operation WAND_DW Word logic operation AND double word operation WOR_DW Word logic operation OR double word operation WXOR_DW Word logic operation Exclusive OR double word operation SHR_ Shift rotate operation Shift right 16 bit integer operation SHR_DI Shift rotate operation Shift right 32 bit integer operation SHL_W Shift rotate operation Shift left word operation SHR_W Shift rotate operation Shift right word operation SHL_DW Shift rotate operation Shift left double word operation SHR_DW Shift rotate operation Shift right double word operation ROL_DW Shift rotate operation Rotate left double word operation ROR_DW Shift rotate operation Rotate right double word operation FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Technical specifications A 7 Valid operations for FM 352 5 module Operation Tanks containers Description BiScale FM 352 5 library Binary scaler TP32 FM 352 5 library 32 bit
101. Dummy BOOL Is used where an output coil is required cannot be cannot be changed cannot be by STEP 7 to execute the operation but changed changed is not needed by your program FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 235 Technical specifications A 7 Valid operations for FM 352 5 module A 7 LAD operations in STEP 7 program elements 236 Valid operations for FM 352 5 module The following table lists the LAD operations that are valid for the FM 352 5 module Operations in italics are function blocks that are available in the FM 352 5 library after you install the FM 352 5 configuration software These FBs are found in the STEP 7 Program Elements catalog in the Libraries container Table A 4 Valid operations for FM 352 5 Operation Tanks containers Description Bit logic NO contact Bit logic NC contact NOT Bit logic Invert power flow Bit logic Coil Bit logic Midline output RS Bit logic Reset set flip flop SR Bit logic Set reset flip flop N Bit logic Detect negative RLO edge P Bit logic Detect positive RLO edge NEG Bit logic Negative edge detection POS Bit logic Positive edge detection CMP Comparator Comparison operations integer and double integer values 16 bits and 32 bits only real values are not supported L
102. ERIOD DINT Input Time period for IN VALID IN VALID constant frequency measurement in PERIOD OUT PERIOD OUT microseconds VALID BOOL Output Indicates that frequency data is valid OUT INT DINT Output Output of function FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 163 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library 6 10 29 Description Delete first value FIFO16 FIFO32 The FIFO operation is available in two versions a 16 bit version FB97 and a 32 bit version FB96 defined by the data width The FIFO shift register stores entries that are written into the FIFO box and represents the stored data upon request When WRITE and EN are active the data present at IN is written into the FIFO box The oldest entry in the FIFO box is available at OUT until it is discarded by activating READ_NEXT The next to oldest entry then becomes the oldest entry If the FIFO box is full 256 entries then FULL becomes active Any write operation that occurs while FULL is active will be discarded EMPTY signals that the FIFO box is empty 0 entries OUT is indeterminate while EMPTY is active ENTRIES indicates the number of entries contained in the FIFO box If EN and RESET are active simultaneously then the FIFO box is cleared All entries are reset to 0 and EMPTY is activated The output value is retentive and uses one clo
103. FB83 and a 32 bit version FB82 defined by the output WORD or DWORD While EN is active FREQ counts the number of rising edges at IN during the number of microseconds defined in PERIOD OUT is updated at an interval of PERIOD microseconds VALID is true when OUT has valid data VALID is false if OUT cannot represent the count rollover occurs and will also be false if the initial period has not elapsed This operation requires one clock pulse If the module changes to STOP or if EN is inactive the FREQ operation is reset The number of microseconds defined in period must elapse before the OUT can be represented FREQ16 is used to measure frequencies of 0 to 65535 216 1 Frequences greater than 32767 215 1 microseconds will appear negative VALID is 0 if the frequency exceeds 65535 FREQ32 is used to measure frequencies of 0 to 4 294 967 295 232 1 Frequencies greater than 2 147 483 647 231 1 will appear negative VALID is 0 if the frequency exceeds 4 294 967 295 The FREQ operation outputs OUT in Hz if the period is set to 1000000 1 second If period is set to 10 000 000 10 seconds then OUT is output in units of 0 1 Hz in other words if OUT 600 then the frequency is 60 0 Hz The output value is retentive and uses one clock phase LAD representation LAD representation Para Datatype Address Description meters IN BOOL Input Input signal whose frequency EN ENO EN ENO P
104. FO Reset OUT Reset OUT READ_NEXT BOOL Input If 1 EMPTY 0 and READ_NEXT FULL READ_NEXT FULL entry is placed in OUT IN EMPTY IN EMPTY m R IN INT Input Data input to FIFO DINT constant OUT INT Output Data output from DINT FIFO ENTRIES INT Output Indicates number of entries stored in the FIFO FULL BOOL Output 1 indicates that FIFO is full and cannot be written to 256 entries EMPTY BOOL Output 1 indicates that FIFO is empty 0 entries FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 165 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 30 Description 166 Delete last value LIFO16 LIFO32 The LIFO operation is available in two versions as a 16 bit version FB99 and as a 32 bit version FB98 defined by the data width The LIFO shift register stores entries that are written into the LIFO box and represents the stored data upon request When the WRITE and EN inputs are active the data present at IN is written into the LIFO box The newest entry in the LIFO box is represented at OUT until it is discarded by activating READ_NEXT The next to newest entry then becomes the newest entry If the LIFO box is full 256 entries then FULL becomes active Any write operation that occurs while FULL is active will be discarded EMPTY signals that the LIFO box is empty 0 entries OUT is indeterminate while EMPTY is active ENT
105. FT constant active OUT is reset to 0000 00000000 OUT WORD Output Output of function FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 159 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 25 Description WordPack When the FB is enabled the input WORDs are concatenated into one DWORD IN_A is the most significant word and IN_B is the least significant word If there is logic for EN the output is latched The output changes only when EN is active This operation requires one phase if there is logic for EN With logic for EN the WordPack value is retentive requiring storage and a phase clock INA IN_B 15 8 7 3 0 jo oft Pols afr of of ofo fof of o 15 8 7 3 0 il sts sols afr of of ofof fof of fof oft sols ilij of of ofo of of of sf fs fofr 1 4 of of ofo J of of 31 8 7 0 24 23 16 15 OUT Figure 6 54 Example of WordPack LAD representation Parameter Data type Addresses Description WordPack IN_A WORD Input constant Input with the most significant word EN ENOF IN_B WORD Input constant Input with the least significant word NA OUT OUT DWORD Output Output of function IN B 160 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 26 WordCast
106. M 352 5 Configuration dialog From the Library folder copy the instruction FBs that you want to use in your FM 352 5 application program to the Blocks folder of the S7 CPU You can also copy the symbol table from the FM 352 5 library to the Blocks folder of the S7 CPU to use as a starting point You can then change symbol names as required Click the Edit the Application FB button on the Programming tab to open the application FB for editing The STEP 7 LAD FBD editor displays the function block with its predefined declaration section Adapt the declaration table to suit your application Names have already been assigned to the elements in the declaration table in the sample FB but you can change these names as necessary where allowed Enter your program logic Create a DB in STEP 7 by selecting the Insert gt S7 Block gt Data Block menu command In the Properties dialog that appears enter the DB number you want to use In the next field select Instance DB In the third field select the application FB number that corresponds to the modified application FB for the FM 352 5 module Then confirm your entries with OK A new DB is created in the Blocks directory of your project As you enter the operations for the FM 352 5 program you use the declared variables as addresses Because the program in the application FB is intended to function in the FM 352 5 module the addresses cannot access any of t
107. Manual 05 2011 A5E00131318 04 Wiring the FM 352 5 4 2 Terminal assignments of the front connector 4 2 Terminal assignments of the front connector Terminal connector and terminal names All inputs outputs encoder signals and I O power supply wiring are connected to the 40 pin terminal connector located behind the hinged panel At the bottom left of the module behind a hinged panel you will find the 1L and 1M terminals for the 24 V DC power supply wiring for the internal electronics of the module This connector along with the 2L 2M terminals represent the minimum wiring required to commission the FM 352 5 module The following figures show the front panel of the module the removable terminal strip and the inside of the connector cover with the terminal labels l 1 3L 21 MCF x T Ya DC5V ove E go e DC a IOF 5V RUN 2 r i ea aa STOP Ei IES ae 5 Ca a 6 A o 2 J RUN 7 sraa S STOP 4 a MRES ene C f eo e up i 3 ai 12 eke a2 3H o a y a eif
108. NT 0 14 0 END_STRUCT FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 99 Programming and operating the FM 352 5 6 3 Setting up the interface FB DB CPU_lIn structure The following table shows an example of the 14 byte structure that returns data from the FM 352 5 module to the CPU In the sample interface FB this structure is called by the pointer DB6 DBBO that calls data block 6 see table below Table 6 13 Example declaration table for the application FB output section as in STEP 7 V5 1 Address Declaration Name Type Section of the outputs The CPU inputs are the outputs from the FM 352 5 module to the CPU 18 0 out CPU_In STRUCT 0 0 out Bits ARRAY 0 15 0 1 out BOOL 2 0 out T2_CVasByte BYTE 3 0 out C1_CVasByte BYTE 4 0 out T2_CV INT 6 0 out T1_CV DINT 10 0 out Enc_CV1 DINT 14 0 out END_STRUCT Table 6 14 Example of a data block DB6 DBBO as in STEP 7 V5 1 Address Name Type Output value 0 0 STRUCT 0 0 Bits ARRAY 0 15 0 1 BOOL 2 0 T2_CVasByte BYTE B 16 0 3 0 C1_CVasByte BYTE B 16 0 4 0 T2_CV INT 0 6 0 T1_CV DINT L 0 10 0 Enc_CV1 DINT L 0 14 0 END_STRUCT FM 352 5 high speed Boolean processor 100 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 4 Debugging a program 6 4 Debugging a program
109. PC with MPI and SIMATIC Micro Memory Card programmer optional Printers SIMATIC Micro Memory Card S7 controller environment Figure 1 3 Examples of system configurations FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Product overview 1 4 Test mode Normal mode 1 4 Modes of operation Modes of operation The test mode is used to test your application program before putting the FM 352 5 module into operation In Test mode you can use the program monitoring and test tools available in STEP 7 This Test mode is possible only with an S7 CPU S7 314 or higher due to memory restrictions or the S7 PLC Simulator S7 PLCSIM The following figure shows the FM 352 5 in a test configuration Testing your application program PG PC with STEP 7 for running programs in test mode and monitoring states Printers 1 FB Simulation program for testing the application program Inputs outputs S7 CPU lt __ gt FM 352 5 BEE Controlled machine or process Figure 1 4 System configuration for testing your program In Test mode the S7 CPU executes the application FB while the FM 352 5 module makes
110. RIES indicates the number of entries contained in the LIFO box If EN and RESET are active simultaneously then the LIFO box is cleared All entries are reset to 0 and EMPTY is activated The output value is retentive and uses one clock phase Note The LIFO16 operation requires 1 RAM block The LIFO32 operation requires 2 RAM blocks All bit shift registers the LIFO and FIFO operations require RAM blocks The maximum number of RAM blocks supported by the FM 352 5 module is 10 Scan cycle n Scan cycle n 1 Scan cycle n 2 Output conditions Entry 1 5 Entry 1 5 Entry 1 5 if Entry 2 100 Entry 2 100 Entry 2 100 Entry 3 125 Entry 3 125 Entry 3 125 IN out_ Entry 4 1 Entry 4 1 Entry 4 1 o FULL Entry 5 654 255 254 ENTRIES 4 ENTRIES 5 ENTRIES 4 ENTRIES FULL 0 FULL 0 FULL 0 3 EMPTY 0 EMPTY 0 EMPTY 0 5 OUT 1 OUT 654 OUT 1 O IN 654 IN 0 IN 654 WRITE 1 WRITE 0 WRITE 0 1 Entry READ_NEXT 0 READ_NEXT 1 READ _NEXT 0 2 No entry FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library LAD representation LAD representation Parameters Data type Addresses Description Reset BOOL Input If 1 and EN is constant active the LIFO LIFO16 LIFO32 entries are res
111. Range of values Default Encoder signal evaluation Pulse amp direction x1 x2 x4 Pulse and direction Source reset None HW SW None HW and SW HW or SW Source reset value Constant 0 Min Max value Constant 0 Load value Reset signal type Edge level Edge Source load value Constant module application Constant Source stop None HW SW None HW and SW HW or SW Load value Input field 0 Count range minimum Input field 0 Count range maximum Input field 32767 16 bits or 2147483647 32 bits Main count direction Up count down count Up count Hardware source stop Inputs 0 to 14 Input 8 Hardware source reset Inputs 0 to 14 Input 11 Enter a value within the range of 32768 to 32767 for a 16 bit counter or 2147483648 to 2147483647 for a 32 bit counter FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Encoder signals and their evaluation Table 7 3 7 1 Types of encoders The following table shows the encoder structure as it appears in the declaration table of the application FB This provides the status information and software controls of the encoder Example Declaration Table for the Application FB Encoder Structure Address Declaration Name Type Static section This definition is position specific The encoder is a structure that has a fixed number of elements The names cannot be changed but the size of Cur_Val and Load_Val must be set to INT or DINT according to wh
112. Red Yellow Green Black Brown Blue Violet Outer shield gt Terminal connections on the FM 352 5 module 5 V encoder 23 3M 24 DC5V 25 DC24V 26 A 2 A 28 B 29 B 30 N 31 N Shield contact element The pin assignment of the encoder connector corresponds with that of connector 6FX2003 0CE12 for encoders 6FX2001 2xxx Figure 4 3 Pin assignment of the incremental encoder cable for 5 V encoders RS 422 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 39 Wiring the FM 352 5 4 4 Connecting encoder cables 40 The following figure shows the pin assignment for an incremental encoder cable available from Siemens and the corresponding connections to the front connector on the FM 352 5 for the 24 V encoder interface The last four characters of the order number specify the cable length 6FX5002 2CA12 0xx0 lt Terminal connections Incremental encoder cable on the FM 352 5 module Terminal Signal Color 24 V encoder 10 M encoder White yellow 23 3M 11 M sensor White blue 12 P encoder White black 25 DC24V 2 P sensor White red 7 Uas Red 5 A Yellow 37 A 6 A Green 8 B Black mm B 1 B Brown 3 R Blue 39 N 4 R Violet Enclosure Outer shield Shield contact element The pin assignment of the encoder connector corresponds with
113. S Q BOOL Output Status of the time PT ET ET INT DINT Output Elapsed time Note No logic is allowed at the EN input FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 139 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library 6 10 4 Off delay timers TOF 16 and TOF32 Description This timer is available in two versions As a 16 bit FB118 and a 32 bit FB115 timer TOF16 and TOF32 delay a falling edge by the time PT A rising edge at the IN input causes a rising edge at output Q A falling edge at the IN input causes a falling edge at output Q delayed by the time PT If the IN input changes back to 1 before the time PT has expired output Q remains set to 1 The ET output provides the time that has elapsed since the last falling edge at the IN input Its maximum value is however the value of the PT input ET is reset when the IN input changes to 1 Signal states 1 wS COCO STU o o 0 1 PT PT Q 5 k k PT a ET A Time Figure 6 44 Timing Diagram for Off Delay Timer TOF Table 6 51 Off Delay Timer TOF LAD representation Parameter Data type Addresses Description IN BOOL Input Start input PT INT DINT Input constant Length of the off delay in 10 ps units PT must be a positive constant Q BOOL Output Status of the time ET INT DINT Output Elapsed time
114. SIEMENS SIMATIC 7 300 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Product overview Q I LA 5 D O to o r D D a N Installing and removing the 3 FM 352 5 Wiring the FM 352 5 4 Configuring the FM 352 5 5 module Programming and operating 6 the FM 352 5 Encoder signals and their lt v ie O 5 gt O Cc eg 0 N gt O A gt OQ 0 o Diagnostics and Using the FM 352 5 with non S7 masters Technical specifications External Protection Circuit for FM 352 5 Boolean Processor Parts lists Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety as well as to prevent damage to property The notices referring to your personal safety are highlighted in the manual by a safety alert symbol notices referring only to property damage have no safety alert symbol These notices shown below are graded according to the degree of danger indicates that death or severe personal injury will result if proper precautions are not taken WARNING indicates that death or severe personal injury may result if proper precautions are not taken CAUTION with a safety alert symbol indicates that minor personal injury can result if proper precautions are not taken CAUTION without a safety alert symbol indicates
115. SIMATIC 300 Station CPU 318 2 i File Edit Insert PLC Debug View Options Window Help e ae e gt eler i2 ul Delal S lee ol laces Peclarstiquas te E fora ry cass pe Lo ETE O E ovr 3 ltemp 0540_0B_NUMBR BYTE 0B40_RESERVED_1 BYTE 5 0 temp 0B40_I0_FLAG BYTE 6 O temp 0B40_MDL_ADDR WORD 8 0 temp OB40_POINT_ApDR DWORD 0B40_DATE_TIME DATE_AND_TIME 0B40_POINT_ ADDR Figure 8 1 Accessing the OB40 interrupts through Ladder Logic Table 8 7 Content of the double word 0B40_POINT_ADDR Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 0 Int 7 Int 6 Int 5 Int 4 Int 3 Int 2 Int 1 Int O 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 FM 352 5 high speed Boolean processor 192 Operating Manual 05 2011 A5E00131318 04 Diagnostics and troubleshooting 8 4 Error correction 8 4 Error correction Overview The following table lists the diagnostic faults errors reported by the FM 352 5 module in data record 0 data record 1 or data record 128 according to the byte and bit numbers Each fault is reported by STEP 7 in online mode as shown in the table The description of each error and its possible causes are also given in the table Table 8 8 Errors Reported by the Module and Possible Causes Byte Bit STEP 7 online FM 352 5 fault error What the diagnostic fault error Possible causes of error message description means
116. UT IN OUT constant be replaced within OUT SELECT SELECT Bit BOOL Input Bit to be Bit Bit constant inserted in OUT OUT INT DINT Output Output of function FM 352 5 high speed Boolean processor 158 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 24 BitShift_W and BitShift_DW Description 6 10 Operations in the FM 352 5 Library The BitShift operation is available in two versions a 16 bit FB89 and a 32 bit FB88 version defined by the output WORD or DWORD When the FB is enabled and SHIFT is active the input BOOL is left shifted into the output WORD OUT The MSB of OUT is discarded The LSB is replaced with BOOL IN If EN and RESET are active simultaneously then OUT is reset to 0000 or 00000000 There is a shift in each scan cycle where EN and SHIFT are both active This operation is retentive and requires one phase 1 2 Figure 6 53 Example of BitShift_W and BitShift_DW OUT prior to execution OUT after execution LAD representation LAD representation Param Datatype Addresses Description IN BOOL Input Input bit to be constant shifted into LSB BitShift_W BitShift_DW of OUT EN ENO EN ENO SHIFT BOOL Input If 1 and EN is Reset OUT Reset OUT constant active shift is enabled IN IN Reset BOOL Input If 1 and EN is SHIFT SHI
117. U_Out H 4 CPU_In CPU_In e i o After execution Module outputs l from Module 0 15 O Figure 6 15 Data Exchange in Test Mode The data flows in the following sequence 1 OB1 calls the Test interface FB that communicates with the FM 352 5 module and associated application FB 2 The Test interface FB reads the inputs of the FM 352 5 module and 3 transfers the data along with the CPU_Out interface data to the instance DB associated with the application FB The Test Interface FB then calls the application FB 4 The application FB reads the input data from its instance DB and uses this data to execute its program 5 While the program is executed the application FB writes the output data back to its instance DB and returns to the Test interface FB 6 The Test interface FB reads the results of program execution from the application FB s instance DB and 7 writes the output results to the module which then sets the outputs 8 The Test interface FB also copies the program execution results back to the CPU_In area of OB1 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 95 Programming and operating the FM 352 5 6 3 Setting up the interface FB DB Calling the Normal Interface FB The change from Test to Normal can be initiated by clicking the Downl
118. _A input by the integer value at the IN_B input and writes the double integer result to the OUT output The DONE output signals that the result is available The valid range for inputs IN_A and IN_B is 32768 to 32767 LAD representation FMMul16 EN ENO REQ DONE IN_A OUTL IN_B Parameter Data type Addresses Description REQ BOOL Input Enables the multiply operation on a 0 to 1 change It must remain 1 until DONE 1 otherwise multiply terminates IN_A INT Input Input value A IN_B INT Input Input value B DONE BOOL Output 1 result is available OUT DINT Output Output value IN_A x IN_B Note No logic is allowed at the EN input FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 16 Description 6 10 Operations in the FM 352 5 Library Divide double 32 bit integer FMDiv32 FMDiv32 divides the 32 bit double integer value at the IN_A input by the double integer value at the IN_B input and writes the result to the OUT output and the remainder to the Remain output The DONE output signals that the result is available The valid range for inputs IN_A IN_B and for the division remainder is 2 147 483 648 to 2 147 483 647 The OVF output is set to logic 1 if an overflow occurs otherwise it is logic 0 When OVF is 1 the OUT and Remain outputs are set to 0 Table 6
119. a detailed index with which you can find specific topics quickly Additional support Training center If you have any further questions about the use of products described in this manual and do not find the right answers here contact your local Siemens representative http www siemens com automation partner A guide to the technical documentation for the various products and systems is available on the Internet e SIMATIC Guide manuals http www siemens com simatic tech doku portal The online catalog and online ordering systems are also available on the Internet e A amp D Mall http Avww siemens com automation mal To help you get started with automation technology and systems we offer a variety of courses Contact your regional Training Center or the central Training Center in D 90327 Nuremberg Germany e Internet SITRAIN homepage http Awww sitrain com FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Preface Technical Support You can access technical support for all A amp D projects via the following e Online support request form http Awww siemens com automation support request Service amp Support on the Internet In addition to our documentation we offer a comprehensive online knowledge base on the Internet at Industry Automation and Drive Technologies Homepage There you will find the following information for example e The newsletter that provides up
120. a reset or load before you begin counting You can program the reset signal to load the counter with 0 the minimum value or the load value The main count direction parameter has no effect on this counter mode When counting up the module increments to the maximum value then rolls over to the minimum value and continues counting This rollover is reported in the overflow status bit When counting down the module decrements to the minimum value then rolls over to the maximum value and continues counting This rollover is reported in the underflow status bit The figure below illustrates how continuous counting functions Count range upper limit down Reset value up down Count range low limit up Up count down Down count H Hold is active R Reset is active L Loading is active Figure 7 1 Continuous Counting Mode FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 173 Encoder signals and their evaluation 7 2 Counting modes of the incremental encoder Single Counting 174 In the single counting mode you can specify the count range as listed below depending on whether you select the 16 bit counter or the 32 bit counter e Counting range 16 bit counter 32768 to 32767 e Counting range 32 bit counter 2 147 483 648 to 2 147 483 647 You must initialize the counter to a known value with a reset or load before you begin counting You can program t
121. aaeeeeeeaaeeeeeeaaeeeeesaaeeeeeeaaeeeseeaaeeeseeaeeeseenaeeesseaas 3 2 Installing and removing the FM 352 5 in an S7 300 system eeececeeeeeeeeeeeeeeeeeeeeeaeeeeeenaeeeeeeaas 3 3 Installing in a stand alone SYStOM 0 ce cecceee sence eee eeeeeeeeeaeeeeeeaaeeeeesaaeeeeeeaaeeeseeaaeeeeeeaeeeeeenateeeeeaas 29 A Wiring the FM 35245 cee cates csicees was aon etcertinstiee tnthcnemn tice a eed RRa seid ueeetatai cme 31 4 1 General rules and regulations ecccceeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeeeneeeeeseeeeeeseeeeeeeseeeaeeeseneaeeeseenaees 4 2 Terminal assignments of the front Connector essssessrresssrnesssnnesernneessnnaatenneerannaattnneenannaaeennaad 4 3 Wiring the FM 352 5 Modul si cccccceccccciecceeccaneececeanaeeccuals cessdenseceeuanl desebanseceuvli desde E EAA 4 4 Connecting encoder Cables sisri aA A S A AANA E KAA ANA AA 39 4 5 Connecting shielded cables via a shield Contact element cee ccce cet ce eee eeteeteeeeeeteeneeeseeee 5 Configuring the FM 352 5 module scsssssssssessssesessseessseessusessusessueessuesssuesssuessaessutessueessseessuversueessnesens 45 5 1 Installing the configuration programmMing software cee cece eeeeeeeeenteeeeeeeeeeeeeeaeeeseeaeeeeeenaeeeeeeaas 45 5 2 Basic tasks ata QIAN CG ete evcsciens cts aa a E a REA EUA E EE EASE E 5 3 Checking the consistency of program and configuration ccccceeeeceeeseeneeeeseeneeeeseeneeeeseenaees 5 4 Overview of
122. ace FB for Test mode is called and this changes the FM 352 5 module back to Test mode and restores the internal test program in the FPGA e The power is turned on again after an interruption which restores the program contained in the SIMATIC Micro Memory Card in the FPGA provided the program is valid otherwise the internal test program is restored e You perform a memory reset as described in section Memory functions Page 408 which restores the program contained in the SIMATIC Micro Memory Card in the FPGA provided the program is valid Cyclic execution on the FM 352 5 module in normal operation You can set the single scan cycle for the FM 352 5 in normal operation by calling the interface FB for normal operation with a 1 signal at the OneScan input and changing the signal at the Run input from 0 to 1 Each time the Run input changes signal 1 the FM 352 5 executes one scan cycle Save the application FB of the FM 352 5 to a SIMATIC Micro Memory Card Requirement You can make additional copies of the FM 352 5 program on SIMATIC Micro Memory Cards by using an EPROM programming device such as the one built into the SIMATIC PG e Use anew or reformatted SIMATIC Micro Memory Card for the FM 352 5 module if this SIMATIC Micro Memory Card has been previously used outside an FM 352 5 e A SIMATIC Micro Memory Card with 128 KB 512 KB or 2 MB of storage capacity is required to operate the FM 352 5 module FM 352 5 high speed Bo
123. ading it to the FM 352 5 module Saving the Program to the CPU Project After you are satisfied that the application FB executes correctly save any changes you made to the application FB in the CPU project In the LAD FBD editor click the Save button or select the menu command File gt Save FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 101 Programming and operating the FM 352 5 6 5 Download program to FM 352 5 module 6 5 Download program to FM 352 5 module Compiling the Application FB To create the special SDB that contains the hardware configuration and the application FB in a form that can be read by the FPGA you must compile the application FB for the FM 352 5 module After creating and testing your application program follow the steps below to compile the program and the hardware configuration in the SDB for the FM 352 5 module 1 Open the FM 352 5 Configuration dialog and select the Programming tab 2 Click the Compile button Downloading the Program to the FM 352 5 Requirement Procedure 102 After compiling the application FB for the FM 352 5 module you can download the SDB to the FM 352 5 module The FPGA derives its code from the image that is transferred during the download e Use anew or reformatted SIMATIC Micro Memory Card for the FM 352 5 module if this SIMATIC Micro Memory Card has been previously used outside an FM 352 5 e A SIMATIC Micro Memor
124. an overview of the basic tasks required to install configure program and operate the FM 352 5 module when configured to operate in an S7 system Table 1 1 Basic tasks to set up and operate the FM 352 5 Installing and configuring the FM 352 5 module e Install the FM 352 5 in an S7 station e Wire the FM 352 5 e Configure the properties and parameters Programming the FM 352 5 module e Create application FB DB e Test user program with STEP 7 e Compile the program and download it to FM 352 5 and SIMATIC Micro Memory Card Troubleshooting e Check status LEDs e Read diagnostics e React to interrupts FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 19 Product overview 7 5 Overview of the main tasks 20 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Getting started 2 1 Overview of getting started Overview The following table provides an overview of the tasks needed to run the sample program for the FM 352 5 module Table 2 1 Getting started Running the sample program p Install and configure the module 1 2 3 4 5 Save and compile the hardware configuration Install the hardware components and wiring Install the configuration software Create a STEP 7 project Configure the hardware Copy the Getting Started sample program objects from the Sample Project
125. an processor Operating Manual 05 2011 A5E00131318 04 Wiring the FM 352 5 4 5 Connecting shielded cables via a shield contact element Installing the Shield Contact Element Install the shield contact element as follows 1 1 2 3 gt a n EN 5 6 Push the two bolts of the fixing bracket into the guide on the underside of the rail Position the fixing bracket under the modules to be wired Bolt the fixing bracket tightly to the rail The bottom of the shield terminal has a forked guide Place the shield terminal at this position onto edge A or edge B of the fixing bracket Press the shield terminal down and swing it into the desired position see figure below You can attach two rows each with up to four shield clamps to the shield contact element bracket Bracket for shield contact element Edge B Forked guide The shield must be located beneath the shield terminal Edge A Shield terminal Figure 4 6 Attaching Shielded Cables to Shield Contact Element FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 43 Wiring the FM 352 5 4 5 Connecting shielded cables via a shield contact element Attaching Cables 44 You can secure up to two shielded cables per shield terminal see figure and table above The cable is connected by its bare cable shield There must be at least 20 mm of bare cable shield pro
126. and hold it there for 3 seconds Release the selector Set the selector to MRES and hold it there until the LED stops flashing 108 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 8 Memory functions Removing the SIMATIC Micro Memory Card during operation You can remove the SIMATIC Micro Memory Card while the module is in RUN mode without having an impact on the operation of the module as long as the power is not interrupted You can also switch between the module modes RUN and STOP when the SIMATIC Micro Memory Card is not inserted as long as the power is not interrupted If there is a power loss the FM 352 5 module changes to STOP and cannot return to RUN mode until a valid SIMATIC Micro Memory Card is inserted The SF LED and MCF LED are lit when the SIMATIC Micro Memory Card is removed from the module The MCF fault only clears after the module has verified that a new SIMATIC Micro Memory Card is valid Verification occurs when The SIMATIC Micro Memory Card is loaded from STEP 7 or when the module is started up or reset FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 109 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 Instruction Set for LAD Programming Introduction The following operations are supported by the Ladder Logic editor and instruction browser of STEP 7 The
127. anged changed 0 1 stat M3L BOOL Power supply for 3L is missing cannot be changed cannot be cannot be changed changed 0 2 stat ESSF BOOL Encoder power supply is overloaded cannot be changed cannot be cannot be changed changed 0 3 stat M2L BOOL Power supply for 2L is missing cannot be changed cannot be cannot be changed changed 0 4 stat MiL BOOL Power supply for 1L is missing cannot be changed cannot be cannot be changed changed 2 0 stat OVERLOAD ARRAY 0 7 Output x is overloaded cannot be changed cannot be cannot be changed changed 0 1 stat BOOL cannot be changed cannot be changed 4 0 stat END_STRUCT cannot be changed 72 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block This part of the static section contains the encoder structure as shown in the table below These elements cannot be changed The entire structure however can be deleted if the encoder is not used Table 6 5 Example of a declaration table for the application FB encoder structure as in STEP 7 V5 1 Address encoder is configured Declaration Name Type Static section This definition is position specific The encoder is a structure that has a fixed number of elements The names cannot be changed but the size of Cur_Val and Load_Val must be set to INT or DINT a
128. anual 05 2011 A5E00131318 04 177 Encoder signals and their evaluation 7 5 Pulse Evaluation 7 5 Introduction Pulse Evaluation The counters of the FM 352 5 count the edges of the signals Normally the edge at A is evaluated for a single evaluation x1 To achieve a higher resolution you can assign the parameter for the encoder signal evaluation to use double or quadruple x2 or x4 evaluation of the signals Use the Parameters tab in the FM 352 5 Configuration dialog to select the type of encoder signal evaluation The A and B signals must be displaced by 90 to select single double or quadruple evaluation Pulse and direction 178 When you select Pulse amp Direction for the encoder signal evaluation type the module counts on the rising edge of each signal A pulse If signal B is O low the counter is incremented If signal B is 1 high the counter decrements saa e Down Signal B as Up directional signal Up Count pulses Down Count pulses Figure 7 6 Pulse amp Direction Counting FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Encoder signals and their evaluation Single Evaluation 7 5 Pulse Evaluation Single evaluation x1 means that only one edge of A is evaluated e The counter increments on a rising edge of A when B is low e The counter decrements on a falling edge of A when B is low
129. are interrupts Preparing to run the sample program If the example application FB FB3 is open make certain you close it first then continue with the following steps to download the Getting Started application example to the S7 CPU 1 Select the Programming tab and click the Compile button to compile the FM program FB3 Click OK in the information dialog and then click OK to close the FM 352 5 Properties dialog From the HW Config window select the menu command Station gt Save and Compile to save and compile the entire hardware configuration From the SIMATIC Manager download the entire Blocks folder of the S7 CPU including the system data to the S7 CPU Set the mode selector on the CPU to the RUN position and that of the FM 352 5 module to the RUN position Watch the status LEDs on each module and note that the CPU changes to RUN but the FM 352 5 remains in STOP The SF status LED is also on because the module is in STOP Running a program in Test mode 1 2 24 Open the VAT_1 object Select the menu command Variable gt Monitor or click the Monitor Variable button Then select the menu command Variable gt Modify or click the Modify Variable button in VAT_1 This sets the module mode to Test RUN by setting the variable Run MO0 1 to 1 Make sure that the Normal Test variable MO 0 is set to O requesting Test mode The LEDs on the FM 352 5 module now
130. as the deleted DB 4 In the next field select Instance DB 5 In the third field select the number of the modified application FB for the FM 352 5 module 6 Confirm with OK The new instance DB is created in the Blocks folder of your project and is updated to contain data that matches the FB FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 77 Programming and operating the FM 352 5 6 2 Creating the application function block Selecting standard STEP 7 operations for the application FB To create your application FB you use bit logic operations for example contacts and coils and comparison operations which come from the standard list of STEP 7 operations as shown in the figure below Program elements Program elements Comparator al HO New network a FT CMP 7 E nan FE CMP lt l ee ET CMP gt I NOTI TI CMP I ae FT CMP gt aes FT CMP lt ie F CMP Se FT CMP lt gt D FT CMP gt D is FT CMP lt D wen FT CMP gt D ay Fj H TELE Fy NEG F Pos Comparator Bit logic E 5 e Converter Comparison instructions Eg Compare CHP Figure 6 1 Valid bit logic and comparison operations from STEP 7 for the FM 352 5 FM 352 5 high speed Boolean processor 78 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block Additional STEP 7 operations for the
131. ate 1 at the Enable EN input The SHL_W operation is used to shift bits 0 to 15 of input IN bit by bit to the left Bits 16 to 31 are not affected Input N specifies the number of bit positions to be shifted If N is higher than 16 the command writes a 0 at the OUT output The same number N of Zeros is shifted from the right in order to occupy the positions which have become free The result of the shift operation can be queried at the OUT output ENO has the same signal state as EN With logic for EN the SHL_W value is retentive requiring storage and a phase clock Table 6 41 SHL_W shift left word LAD representation Parameter Data type Addresses Description SHL W EN BOOL Input Enable input lEN ENO ENO BOOL Output Enable output sine IN WORD Input Value to be shifted K N WORD Input Number of bit positions to be shifted OUT WORD Output Result of shift operation 15 Bi Ten a0 IN 000 0 1111 0101 0101 6 digits N 6 i a sae OUT fo 0001 4 140 1 0101 0100 000 0 Ses ee ee Sea Those six bits will be lost The released digits are assigned zeroes Figure 6 31 Example of Bit Shifts for the SHL_W Instruction DIn O n 0 SHL_W Dout o EN ENO _ _ Conn arrWCon 0 IN OUT Conn arrWCon 2 Conn arrWCon 1 N Figure 6 32 Example of the SHL_W Shift Left Word Instruction The SHL_W box is activated when 1 is set at DIn 0 Conn arrWCon 0 is loaded and shifted le
132. ation FB and the static parameters If you make any changes to the static parameters or any changes to the application FB you will need to recompile to generate the correct consistency Changes made to the dynamic parameters do not make it necessary to recompile the FM 352 5 program but the changed hardware configuration must be downloaded to the S7 CPU If you transfer a program from a module in one system to another you can copy the module hardware configuration from one system to the other system and then compile After the configuration is downloaded to the CPU in the new system you can insert the SIMATIC Micro Memory Card containing the module s program power up the new FM 352 5 module and execute the program This maintains the consistency between the CPU and the module program If the hardware configuration of one system is different from the other the consistency check will fail Note You can disable the consistency check in the Advanced Parameters of the Parameters dialog If the consistency check for the SIMATIC Micro Memory Card or for the system data block in the CPU is disabled the consistency is not checked and any program will be allowed to run FM 352 5 high speed Boolean processor 48 Operating Manual 05 2011 A5E00131318 04 Contiguring the FM 352 5 module 5 4 Overview of hardware contiguration 5 4 Overview of hardware configuration Basic Steps for Installing and Configuring the FM 352 5 Module The fo
133. ations for FM 352 5 module FM 352 5 high speed Boolean processor 242 Operating Manual 05 2011 A5E00131318 04 External Protection Circuit for FM 352 5 Boolean B Processor The SIMATIC S7 FM 352 5 module is available in two different versions e FM 352 5AH1x 0AE0 has sourcing outputs e FM 352 5AHOx 0AE0 has sinking outputs The information contain in SIMATIC S7 300 CPU 31xC and CPU 31x Operating Instructions Installation http support automation siemens com WW view en 13008499 Lightning and Overvoltage Protection appendix applies to both modules However special wiring is required for the outputs In order to subject the modules to surges in conformity with IEC 61000 4 5 external protective circuitry is required Ordering data The components required for wiring the 24 V power supply and 24 V outputs can be obtained from the following sources e Surge arrester BLITZDUCTOR VT BTV AD 24 Item No 918402 DEHN SOHNE GmbH Co KG P O Box 16 40 D 92306 Neumarkt Germany e Transil Diode P6KE36A 600W e g STMicroelectronics ON Semiconductor Motorola FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 243 External Protection Circuit for FM 352 5 Boolean Processor Wiring The following connection diagrams show how the components are to be connected in accordance with the specifications fo W x fs x a x xt 9 N ite oO NR N W o Current sourcing Lightning Lightn
134. auses of an encoder wire break and some possible actions you can take to remedy the problem The diagnostic function cannot identify the exact cause of the fault It is also not possible for wire break diagnostics to detect all 190 connection and hardware faults Table 8 6 Encoder broken wire diagnostics Possible causes Encoder cable broken or not plugged in Encoder has no quadrature signals Incorrect pin assignment Encoder signals short circuited The encoder is not operating Possible corrective actions Check the encoder cable to ensure that wires are properly connected Ensure that your installation conforms to the encoder specifications and to the FM 352 5 module requirements Check the parameters that you assigned in the Hardware Configuration dialog Parameters tab to ensure correct setup Note When broken wire diagnostics is enabled and the SSI absolute encoder is not selected signals A A inverse B B inverse and N N inverse signals are checked When broken wire diagnostics is enabled for an SSI absolute encoder only signals D and D inverse are checked FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Diagnostics and troubleshooting 8 3 Interrupts 8 3 Interrupts Alarm processing The FM 352 5 can trigger hardware process interrupts and diagnostic interrupts You service these interrupts in an interrupt OB
135. by two as shown in the figure below Signal states TULA de Time Figure 6 41 Timing Diagram for Binary Scaler BiScale Table 6 48 Binary scaler BiScale LAD representation Parameter Datatype Addresses Description BiScale C BOOL Input Input to be converted EN ENo Q BOOL Output Output of the function Note No logic is allowed at the EN input FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 137 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library 6 10 2 Description Pulse timers TP16 and TP32 This timer is available in two versions As a 16 bit F B116 and a 32 bit FB113 timer Pulse timers TP16 and TP32 generate a pulse with the length PT A rising signal edge at input IN starts the pulse Output Q remains set for the time PT regardless of changes in the input signal in other words even when the IN input changes back from 0 to 1 before the time PT has expired The ET output provides the time for which output Q has already been set The maximum value of the ET output is the value of the PT input Output ET is reset when input IN changes to 0 however not before the time PT has expired Signal states 0 w il erie 0 PT ET Time Figure 6 42 Timing Diagram for Pulse Timer TP Table 6 49 Pulse Timer TP LAD representation
136. ccceceeeeeeeeeceeeeeseeeeeeaeeeeeeeseeeeeseaeeseeeseeneee 6 10 11 Data selector DatSel32 and DatSel16 2 cece cre eects ene ceeneeneeeeeeeeesaeeseseenieeseeaeel 147 6 10 12 Add FMAdd32 and FMAdd16 0 cccccceececeeeeeceeeeeeeeeeeseaeeeceaeseneeeseaeeesaeeeeeeeseeeeeseaeeseieeeeeneee 6 10 13 Subtract FMSub32 and FMSub16 ceccccceecseceenecneecseenecnseceeneenseceeeseesecseeseeesniseseensel 148 6 10 14 Multiply double 32 bit integer FMMUI32 0 ceccceeecceeeeeceeeeeceeeeeceaeeesaeeeeeeeseeeeeseaeeeeeeeeeeee 6 10 15 Multiply 16 bit integer FMMUI16 ceccceceeceeeececeee cece aeeeeeeececeeeceaeeeseaeeeeneeseeeeeseaeessneeseaeeees 150 6 10 16 Divide double 32 bit integer FMDiV32 cceeeceeeecceeeeeceeeeeceneeeseaeeeseaeeeceeeseeeeseaeeeeeeeeeeeeee 6 10 17 Divide 16 bit integer FMDiV16 cc ccceeecceceneceeececeeeeeceaeeeeaeeceneeeceaeeesaaeeeeaeeseieeeseaeeeeneeeeeeee 152 6 10 18 Encode binary position ENCODE ccccccccccceeeeeeeeeee cae eeeaeeceeeeeseeeeesaaeeeeaeeseeeeeseasensneeeeeeeen 6 10 19 Sum number of bits BIJSUM ss ierit in istinu e niara EE E EE EE ET EER LE 154 6 10 20 BitPack_W and BitPack_DW cccccecceeeeceeeneceeseeceeeeeeeaeeeseaeseeeeseaeeesaaeeseaeeseeeeesuaseeeneeseeee 6 10 21 BitCast_W and BitCast_DW 00 0 cece cence ee tene eect sriain Nenana EE AAE NEA EEEE 6 10 22 BitPick_W and BitPick_DW cceccceeesececeeceeeeeeeeeeec
137. ccording to which size of Comment 38 0 stat Encoder STRUCT Encoder structure Do not change 0 0 stat Direction BOOL Status Direction 0 up count 1 down count 0 1 stat Home BOOL Status 1 encoder is at home position 0 2 stat Homed BOOL Status 1 Home was adopted since power up 0 3 stat Overflow BOOL Status 1 overflow displayed for the duration of one cycle 0 4 stat Underflow BOOL Status 1 Underflow displayed for 1 cycle 0 5 stat SSIFrame BOOL Status SSI frame error or power loss 0 6 stat SSIDataReady BOOL Status 0 SSI encoder has not yet shifted valid data 1 data available 0 7 stat Open_Wire BOOL Status 1 Encoder has open wire 1 0 stat Hold BOOL Hold software input for incremental encoder 1 1 stat Reset BOOL Reset software input for incremental encoder 1 2 stat Load BOOL Load software input for incremental encoder 2 0 stat Cur_Val DINT Current value for incremental encoder can be changed DINT for 32 bit encoder INT for 16 bit encoder 6 0 stat Load_Val DINT Load value for the encoder DINT or INT can be changed 10 0 stat END_STRUCT If an encoder structure is used it cannot be changed If it is not used it can be deleted FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 73 Programming and
138. ck phase Note The FIFO16 instruction consumes 1 RAM block The FIFO32 operation requires 2 RAM blocks All bit shift registers the LIFO and FIFO operations require RAM blocks The maximum number of RAM blocks supported by the FM 352 5 module is 10 Scan cycle n Scan cycle n 1 Scan cycle n 2 Output conditions Entry 1 5 Entry 2 100 Entry 1 1 Entry 1 100 a O Entry 3 125 Entry 2 100 Entry 2 125 TT FULL Entry 4 1 Entry 3 125 Entry 3 1 m 255 i Entry 4 1 Entry 4 654 254 Entry 5 654 ENTRIES ENTRIES 4 ENTRIES 5 ENTRIES 4 B FULL 0 FULL 0 FULL 0 r A EMPTY 0 EMPTY 0 EMPTY 0 2 E Z CMPT OUT 5 OUT 5 OUT 100 IN 654 IN 0 IN 0 WRITE 1 WRITE 0 WRITE 0 OUT READ_NEXT 0 READ_NEXT 1 READ_NEXT 0 1 Entry 2 No entry LAD representation LAD representation Parameters Data type Addresses Description Reset BOOL Input If 1 and EN is active constant the FIFO entries are reset to 0000 00000000 164 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library LAD representation LAD representation Parameters Data type Addresses Description FIFO16 FIFO32 WRITE BOOL Input If 1 FULL 0 and EN EN ENO EN ENO constant is active IN is written into the FI
139. ckplane is faulty 0 6 Parameters Parameter data record The FM 352 5 has not received The PLC hardware have not been 0 not received parameter assignment data configuration has errors assigned to the from the PLC or the module The system communications module has lost parameter assignment network is faulty gale re The system must be restarted A communications error has and parameters assigned occurred in the system again FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 193 Diagnostics and troubleshooting 8 4 Error correction Byte Bit STEP 7 online FM 352 5 fault error What the diagnostic fault error Possible causes of error message description means 0 7 Incorrect Parameter assignment The FM 352 5 program The FM 352 5 program on the parameters on error consistency check has failed SIMATIC Micro Memory Card the module This means that the program does not match the hardware or parameters that were loaded configuration stored on the to the FM 352 5 module from PLC and loaded to the the SIMATIC Micro Memory FM 352 5 module on startup or Card or the PG do not match a transition of the PLC from the parameters that were STOP to RUN downloaded from the PLC The FM 352 5 program has not Note The consistency check been compiled and may be disabled in the downloaded by 1 FM 352 5 FM 352 5 module Advanced and 2 S7 Hardware Para
140. coder signals and their evaluation 7 2 Counting modes of the incremental encoder Periodic counting In the periodic counting mode you can specify the count range e Counting range 16 bit counter 32768 to 32767 e Counting range 32 bit counter 2 147 483 648 to 2 147 483 647 You must initialize the counter to a known value with a reset or load before you begin counting You can program the reset signal to load the counter with 0 the minimum or maximum value or the load value When the main count direction is set to Count Up the counter behaves in the following ways e It increments to the maximum value then rolls over to the minimum value and continues counting This rollover is reported in the overflow status bit e t decrements to the lower limit of the counter rolls over to the upper limit and continues counting This rollover is not reported in the overflow or underflow status bits When the main count direction is set to Count Down the counter behaves in one of the following ways e t decrements to the minimum value then rolls over to the maximum value and continues counting This rollover is reported in the underflow status bit e It increments to the upper limit of the counter rolls over to the lower limit and continues counting This rollover is not reported in the overflow or underflow status bits The figure below illustrates how periodic counting functions High count limit Count range upp
141. d can be changed 138 0 stat TmrOf1 TOF32 32 bit timer FB115 can be changed can be changed can be changed 156 0 stat TmrP2 TP16 16 bit timer FB116 can be changed can be changed can be changed 170 0 stat TmrOn2 TON16 16 bit timer FB117 can be changed can be changed can be changed 184 0 stat TmrOf2 TOF 16 16 bit timer FB118 can be changed can be changed can be changed 198 0 stat SReg1 SHIFT Shift registers FB124 to FB127 can be changed can be changed can be changed 718 0 stat SReg2 SHIFT2 can be changed can be changed can be changed 1238 0 stat BiS BiScale 2 1 binary scaler FB112 can be changed can be changed can be changed 1244 0 stat CIk50 CP_Gen Pulse generator FB119 can be changed can be changed can be changed Note 74 Your project must contain all FBs that are listed in the declaration section of the application FB in order to be accessible for execution Any declared FBs that have no corresponding FB in the project will appear in red FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block This part of the static section contains declarations for flip flop operations and positive and negative edge operations as shown in the table below These names can be changed Table 6 7 Example of a declarati
142. e FM 352 5 module that are used in test mode ApplnstDB Block_DB The number of the instance DB of the FB for the FM 352 5 module used in Test mode This parameter is used only in the FM Interface Debug FB in test mode FM 352 5 high speed Boolean processor 98 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 CPU_Out structure The following table shows an example of the 14 byte structure that transfers data from the CPU to the FM 352 5 module In the sample interface FB this structure is called by the 6 3 Setting up the interface FB DB pointer DB5 DBBO that calls data block 5 see table below Table 6 11 Example Declaration Table for the Application FB Input Section as displayed in STEP 7 V5 1 Address Declaration Name Type Input section Bytes 2 through 15 are data from the CPU for the FM 352 5 module 2 0 in CPU_Out STRUCT 0 0 in Bits ARRAY 0 15 0 1 in BOOL 2 0 in T1_PV DINT 6 0 in T2_PV BYTE 7 0 in CmpByte BYTE 8 0 in C1_PV INT 10 0 in CP_Period WORD 12 0 in CMPInt INT 14 0 in END_STRUCT Table 6 12 Example of a data block DB5 DBBO as in STEP 7 V5 1 Address Name Type Output value 0 0 STRUCT 0 0 Bits ARRAY 0 15 0 1 BOOL 2 0 T1_PV DINT L 0 6 0 T2_PV BYTE B 16 0 7 0 CmpByte BYTE B 16 0 8 0 C1_PV INT 0 10 0 CP_Period WORD W 16 0 12 0 CMPInt I
143. e changed can be changed 6 0 stat END_STRUCT can be changed FM 352 5 high speed Boolean processor 234 Operating Manual 05 2011 A5E00131318 04 Technical specifications A 6 Function block declaration table Address Declaration Name Type Comment Static section This definition is not position specific You can change the names inside the structure except for Conn You can use any combination of BOOL INT DINT or Array of BOOL INT or DINT 1264 0 stat Conn STRUCT Resources for connectors can be changed cannot be changed 0 0 stat XCon BOOL Elements can be BOOL can be changed can be changed can be changed 2 0 stat arrXCon ARRAY 0 31 Elements can be an array of BOOL can be changed can be changed can be changed 0 1 stat BOOL can be changed 6 0 stat ICon INT Elements can be INT can be changed can be changed can be changed 8 0 stat arrlCon ARRAY 0 3 Elements can be an array of INT can be changed can be changed can be changed 2 0 stat INT can be changed 16 0 stat DICon DINT Elements can be DINT can be changed can be changed can be changed 20 0 stat arrDICon ARRAY 0 3 Elements can be an array of DINT can be changed can be changed can be changed 4 0 stat DINT can be changed 36 0 stat END_STRUCT can be changed Temp section This definition is position specific The name cannot be changed 0 0 temp
144. e configuration by selecting the menu command Station gt Save and Compile Setting up a project 1 In the SIMATIC Manager open the directory with the sample projects and copy the following objects from the ZEn29_01_FM352 5_ Prog Blocks folder to the Blocks folder of the S7 CPU OB1 OB40 FB3 FB30 FB31 FB113 FB114 FB119 DB3 DB5 DB6 DB30 DB31 VAT_1 and SFC64 2 Copy the diagnostic interrupt OB OB 82 to your program Use the S7 command Insert gt S7 Block gt Organization Block gt OB82 3 Copy the Symbols object from the sample program to your S7 program folder of the S7 CPU FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 23 Getting started 2 2 Running the FM 352 5 sample program Configuring the module parameters 1 2 Return to HW Config and double click on the FM 352 5 to open the Properties dialog for the FM 352 5 module Select the Addresses tab and assign the input and output addresses Note The sample program uses address 256 in FB30 and FB31 for the inputs and outputs If you select a different address you will need to change the address parameters in FB30 and FB31 to match what you have selected 3 Select the Parameters tab 4 Open the Basic Parameters folder and click the check box to enable Interrupt generation Then select Hardware Interrupts Then open the Hardware Interrupts Enable folder and click the check boxes to enable all 8 hardw
145. e effects of this variability should be checked e The FM 352 5 s inductive switching limits are the same as the resistive limits if commutation diodes are used Commutation Diodes If the relay inductance and current is beyond the power handling capability of the FM 352 5 a silicon or Schottky diode may be placed across it to absorb the inductive kick The current capability of the diode must be at least as great as the operating current of the relay and the reverse voltage must be greater than the maximum relay supply voltage The diode must be capable of dissipating the energy in the inductor at the maximum programmed cycle rate of the FM 352 5 output Diode commutation of a relay is relatively slow If faster commutation is required a zener diode may be placed in opposition to the silicon or schottky commutation diode Higher commutation voltage will reduce reset time but the commutation voltage must always be less than the minimum FM 352 5 commutation voltage of 40V The diode pair must be capable of dissipating the energy in the inductor at the maximum programmed cycle rate of the FM 352 5 output FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 223 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes The following figure shows the use of commutation diodes Single commutating diode Zener commutating diode Slow reset Ga Faster reset 2L 2L
146. e names of elements can be freely can be changed can be changed changed assigned 0 2 stat ThirdEdge BOOL can be changed can be changed can be changed 2 0 stat Edge4to10 ARRAY 4 10 can be changed can be changed can be changed 0 1 stat BOOL can be changed 4 0 stat LastEdge BOOL can be changed can be changed can be changed 6 0 stat END_STRUCT can be changed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 75 Programming and operating the FM 352 5 6 2 Creating the application function block This part of the static section contains declarations for connectors as shown in the table below These names can be changed Table 6 8 Example of declaration table for the application FB connectors as in STEP 7 V5 1 Address Declaration Name Type Comment Static section This definition is not position specific You can change the names inside the structure except for Conn You can use any combination of BOOL INT DINT or Array of BOOL INT or DINT 1264 0 stat Conn STRUCT Resources for connectors can be changed cannot be changed 0 0 stat XCon BOOL Elements can be BOOL can be changed can be changed can be changed 2 0 stat arrXCon ARRAY 0 31 Elements can be an array of BOOL can be changed can be changed can be changed 0 1 stat BOOL can be changed 6 0 stat ICon INT Element
147. e scan bit is set to 1 the module executes one cycle scan when the RUN bit changes from 0 to 1 FM 352 5 high speed Boolean processor 202 Operating Manual 05 2011 A5E00131318 04 Using the FM 352 5 with non S7 masters Bit Definitions of the Encoder Status Bytes The bits of the status bytes defined in the following tables allow your program to determine the status of the encoder 9 3 User data interface Table 9 5 Encoder Status Byte 1 Bit no Definition Module reaction 7to1 Reserved 0 0 Encoder selected 1 encoder has been selected Table 9 6 Encoder Status Byte 2 Bit no Definition Module reaction 7 SSI data available 1 SSI data is available 6 SSI frame 1 SSI data error 5 Underflow 1 underflow of the encoder count 4 Overflow 1 overflow of the encoder count 3 Homed 1 encoder has been homed synchronized 2 Home 1 encoder is at home reset position 1 Last count direction 1 last count input direction was down 0 Size 1 encoder counter or SSI encoder is 32 bit These bits may change faster than the automation system scan and are not visible most of the time Bit Definitions of the Encoder Control Byte The bits of the control byte defined in the following table allow your program to control operation of the encoder Table 9 7 Encoder Control Byte Bit no Definition Command to module 7 Reserved 0 6 Reserved 0 5 R
148. e sy as s I a a as elon 177 37 a7 no E 18 1 38 apei omeje aM 1M 8 2M 3M FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 33 Wiring the FM 352 5 4 2 Terminal assignments of the front connector 1 Removable terminal strip 2 Wiring diagram on the inside of the front panel door 3 Strain relief mount 4 Removable connection for the 24 VDC module power supply 5 Hinged front panel Figure 4 1 Front connector of the FM 352 5AH01 module outputs low FM 352 5 high speed Boolean processor 34 Operating Manual 05 2011 A5E00131318 04 Wiring the FM 352 5 4 2 Terminal assignments of the front connector o l J 12M 3L 21 a SIEMENS e e I MCF E o 2 a DC5V a 3 _ 44 23 IOF me svr E 4 ge N Be leave S_ _ pee stop 4 E
149. ed IN OUT N WORD Input Number of bit positions to be shifted N OUT INT Output Result of shift operation Tos w fo 0 IN 10101111 000 o 1010 _ ve 4 digits N 4 Signbt Doa O S OOO O our 1 1 1 1 1010 111 1 0 00 0 101 0 Sey CE a The released digits are assigned the Those four bits signal state of the sign bit will be lost Figure 6 28 Example of Bit Shifts for the SHR_I Instruction Din 0 SHRI Dout o en mo Conn arrlCon 0 IN OUT Conn arrlCon 1 Conn arrWCon 0 N Figure 6 29 Example of the SHR_I Shift Right Integer Instruction The SHR_I box is activated by 1 at Din 0 Conn arrlCon 0 is loaded and shifted right by the number of bits specified with Conn arrWCon 0 The result is written to Conn arrlCon 1 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 127 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 24 Description SHR_DI shift right 32 bit double integer The SHR_DI Shift right double integer operation is enabled by signal state 1 at the Enable EN input The SHR_DI operation is used to shift bits O to 31 of input IN bit by bit to the right Input N specifies the number of bit positions to be shifted If N is greater than 32 the command operates as if N 32 was set The bit positions shifted in from the left to fill vacated bit positions are assigned the s
150. eeeee seas eeceaeseneeeseaeeesaaeeseeeeseeeeesiaeeseeeseeee 6 10 23 BINS E wiciigih Aidehnaiiah elie ennai ete Bie ce eee ee eee 158 6 10 24 BitShift W and BitShift_DW 0 2 eeccccece ee ceeeeeeeee cents seas eeeeaeseceeeseaeeeseaeseeeeeseeeeeseaeeseeeeeeneee 6 10 25 WWONDP ACK icciiceks havc feeelled ea et nent eae i ae Ge chien adda ieee eoed 160 6 10 26 WordCact E E A E E E 6 10 27 Period measurement PERIOD16 PERIOD32 nsnnsnssssrssrrirtnttntnrtntnrtntnnnnnnntntnnnnnnnn nennen ene 162 6 10 28 Frequency measurement FREQ16 FREQ32 sssseseessssrsseerrssetrrssrirrsstrnssttnnnsttnnnsttn nasten nne 6 10 29 Delete first value FIFO16 FIFO32 ssessseesssesseeessessseessnrssnrrrnretrnetrnetnnetrnstnnstnnstnnsrnssennsnn seneo 164 6 10 30 Delete last value LIFO16 LIFO32 0 cccceeeeeeneeeeeenneeeeeeneeeeeeaaeeeeeeaaeeeseeaeeesetaeeeeeeiaeeseeaes 7 Encoder signals and their evaluation c scsssssssssssssssssssssssssssssssssssssssssssssssessssesseessssesessssssseeseeees 7 1 Types Of CMCOUGIS cc cis Sctdetesdieete citieeds Aihee dee tee te eed Marae een sedendaa eae AE 169 7 2 Counting modes of the incremental encoder cee eeeeeeeeeeeeeeeeeceeeeeeeaeeeeeeaaeeeseeaeeeeeenaeeeeeenas 172 7 3 RS 422 differential encoder signals ccceceeeeeeeeeeeeeeeeeeeeeeeeseneeeeeeeeeeeeeseeeeeeeseneeeeeseeeaeeeseeaees 176 7 4 24 V single ended encoder signals HTL ccccceeeseeeeeeeeeeeeeee
151. eeeeeeeenaeeeeeeaeeeeeenaeeeeeenaeeeeeeaas 177 7 5 Pulse Evaluation s 20 ccssceceiesssevcsiccecte sia siedesaesccs EE EE EET A 178 7 6 Sol absolute encodar S ieciite ect eikonal de AN N A eleens 181 8 Diagnostics and troubleShooting ccceesseeeeeseeeeeeeeeeeeeeeseeeeeesaeeeeesaneeeeesaeeeseeseaeessessaeeeseseneeeesseneees 8 1 Reading the status LEDS encans a pega area eet aelaee 183 8 2 Diagnostic MESSAGES si icsscectesssceeeideaciees niea E AENEA EAT EEEE 8 3 INtETUDi Siea a a chun E A a a E a a 191 8 4 Error corretto ccerseeeeniinn ena E TE E AE 193 9 Using the FM 352 5 with non S7 masters ccccceccesesseeseseeeseeeeseeseeeseseeseeeesaeeeseeeeeeeeanseseeesneesaeesaeeeas 199 9 1 Prerequisites for non S7 applications c cccceceeeeeeeeeeceeeeeeeeeceeeaeceeeeeeeseceneaeceeeeesesensenaeeeeess 199 9 2 Non S7 CPU system requirements serisinin aan aa AA AAA ANR KANAE 9 3 User data interface cececccceeceeeceeeeeeeeeeeeeeneeeeeeeeeeesaeeeeeseeeeeeseeeeseeeeeaeeeseeeeeeeseeeaeeeseaaeeeeseenaees 201 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 9 Table of contents A Technical specifications is 22 5cccctdesziicbeksiaesiaseseek lela n taaene deli thee Dvaatihaetehaddeaasianiiadeiathdins ielatietnalindetenl 205 A 1 General technical specifications cccccccceceeeeeeeneeeceeeeeeeeeceaeaeeeeeeeseseceaeaeeeeeeeseesenieeeeeeeeneees 205 A 2 Technical specifications
152. elected the broken wire diagnostic function checks the signal status of A A inverse B B inverse and N N inverse If one of the inputs is not used you must strap it in order to provide a non zero differential voltage Otherwise the unused input will cause a broken wire indication To avoid a broken wire diagnostic message tie the unused input signals X to 5V and X inverse to GND FM 352 5 high speed Boolean processor 176 Operating Manual 05 2011 A5E00131318 04 Encoder signals and their evaluation 7 4 24 V single ended encoder signals HTL 7 4 24 V single ended encoder signals HTL 24 V single ended encoder signals HTL The 24 V single ended incremental encoder supplies the signals A B and N in the same phase relationship as the signals A B and N in the case of the differential incremental encoder The signals A and B are phase shifted by 90 Encoders that do not supply inverse signals are known as single sided or asymmetric encoders There are also encoders with a direction level The following figure shows the sequence over time of the 24 V pulse encoder signals with direction level and the resulting count pulses Terminal 37 Signal A _ Down 38 Signal B as Up directional signal Up a i eT Count pulses Down Count pulses Figure 7 5 Signals of a 24 V Pulse Encoder with Direction Level FM 352 5 high speed Boolean processor Operating M
153. ent 100 mA g Current 300 mA Current 500 mA Figure A 8 Graph 2 Thermal for Inductive Load 222 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Technical specifications A 5 Switching frequency for inductive loads without commutating diodes Application Notes and Assumptions The following information is a list of application notes and assumptions that pertain to the FM 352 5 module e 3 L Ris the time required to charge the inductance to 95 by Vin It is assumed to be the minimum on or off time for the relay to open or close e 7X L R 6 is assumed the theoretical maximum switching frequency for the relay It will probably be lower e The relay duty cycle must not be greater than 50 at the maximum switching frequency e Ifthe thermal switching limit of an output on the FM 352 5 is exceeded then reliability may be reduced unless the maximum ambient temperature is below 60 C or the I O loading is less than maximum e The FM 352 5 will not be damaged by brief current or thermal overloads but will be damaged if an inductive load exceeds the destruction limit The single pulse avalanche energy rating of the FM 352 5 output is 55 mJ maximum e The FM 352 5 provides clamping for inductive reset at 45 V typical 40 V minimum 55 V maximum The turn off time of the inductor is affected by the reset voltage When the turn off time is an appreciable part of the cycle time th
154. er limit Load yale lt besAecesn se oe oe eee tee ee Nee eet secs R Count range low limit ReseL g Low count limit up Up count Up count default down Down count Reset value 0 H Hold is active R Reset is active L Loading is active Figure 7 3 Periodic counting FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 175 Encoder signals and their evaluation 7 3 RS 422 differential encoder signals 7 3 RS 422 differential encoder signals RS 422 differential encoder signals The differential encoder supplies the differential signals A A B B and N N to the module The signals A B and N are the inverted signals of A B and N The signals A and B are phase shifted by 90 Encoders with these six signals are known as differential or symmetric encoders Signals A and B are used for counting Signal N is used for setting the counter to the reset value if the parameters are set accordingly The following figure shows the time sequence of these signals Terminal 26 Signal A 27 SignalA 28 Signal B E 29 Signal B j _ j 30 Signal N L E 31 Signal N Count direction Up Down Figure 7 4 RS 422 differential encoder signals The module recognizes the count direction from the phase relationship of signals A and B Note When a quadrature encoder is s
155. es a list of the module diagnostic and process alarms that can be set on the FM 352 5 module These are dynamic parameters that can be changed by the Controling program in RUN mode using SFC 55 to write data record 1 see chapter Controlling Page 106 These parameters are not part of the module consistency check and can therefore be changed without generating a parameter assignment error Table 5 2 Diagnostic interrupt parameters dynamic Parameters Description Range of values Default Missing auxiliary supply 1L power supply interrupt Enable disable Disabled voltage 1L reverse polarity low voltage internal fault etc Missing input output 2L power supply interrupt Enable disable Disabled supply voltage 2L reverse polarity low voltage internal fault etc Encoder sensor supply Fault in the encoder power Enable disable Disabled fault supply or wiring Missing encoder supply 3L power supply interrupt Enable disable Disabled voltage 3L reverse polarity low voltage internal fault etc SSI frame error Incorrect frame size power Enable disable Disabled loss on the encoder broken wire etc Differential incremental Broken or disconnected cable Enable disable Disabled encoder RS 422 incorrect pin assignment broken wire encoder malfunction short circuited encoder signals etc MMC diagnostic SIMATIC Micro Memory Card Enable disable Disabled program missing or invalid etc
156. es at IN1 and IN2 bit by bit The values are interpreted as pure bit patterns The result can be scanned at the OUT output ENO has the same signal state as EN With logic for EN the WAND_W value is retentive requiring storage and a phase clock Table 6 33 WAND_W WORD AND words LAD representation Parameter Data type Addresses Description WAND_W EN BOOL Input Enable input lEN ENo ENO BOOL Output Enable output Shige soor IN1 WORD Input First value of the logic operation IN2 WORD Input Second value of the logic operation IN2 OUT WORD Output Result word of the logic operation Din 0 n 0 WAND_W Dout o Conn arrWCon 0 J W 16 F EN ENO _ _ IN1 OUT Conn arrWCon 1 IN2 Figure 6 22 Example of the WAND_W AND Words Instruction The operation is executed if DIn 0 1 Only bits 0 to 3 of Conn arrWCon 0 are relevant the remaining bits of Conn arrWCon 0 are masked by the IN2 word bit pattern Example Conn arrWCon 0 01010101 01010101 IN2 00000000 00001111 Conn arrWCon 0 AND IN2 Conn arrWCon 1 00000000 00000101 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 121 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 18 Description The WOR_W word OR wo
157. eserved 0 4 Reserved 0 3 Reserved 0 2 Load 1 load encoder counter 1 Software reset 1 reset the encoder counter 0 Software hold 1 hold the encoder counter value FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 203 Using the FM 352 5 with non S7 masters 9 3 User data interface Bit Definitions of the Power Supply Status Byte The bits of the power supply status byte defined in the following table allow your program to determine the status of each of the power supplies to the module Table 9 8 Power Supply Status Byte Bit no Definition Module reaction 7 1L missing 1 missing auxiliary supply voltage 1L 6 2L missing 1 missing input output supply voltage 2L 5 Encoder sensor supply fault 1 encoder power supply or wiring fault 4 3L missing 1 missing encoder supply voltage 3L 3 Reserved 0 2 Reserved 0 1 Reserved 0 0 Reserved 0 Bit Definitions of the SSI Encoder Status Byte The bits of the SSI encoder status byte defined in the following table allow your program to determine the status of the SSI encoder Table 9 9 SSI Encoder Status Byte Bit no Definition Module reaction 7 SSI frame error 1 SSI data frame fault 6 Differential incremental encoder 1 broken wire or encoder malfunction detected RS 422 broken wire 5 0 Reserved 0 Bit definitions of the SIMATIC Micro Memory Card sta
158. et to EN ENO EN ENO 0000 00000000 Reset OUT Reset OUT WRITE BOOL Input If 1 FULL 0 and constant EN is active IN is WRITE ENTRIES WRITE ENTRIES written to the LIFO BERD NENT FULL READ_NEXT FULL READ NEXT BOOL Input If 1 EMPTY 0 IN EMPTY IN EMPTY constant and EN is active next entry is placed in OUT IN INT Input Data input to LIFO DINT constant OUT INT Output Data output from DINT LIFO ENTRIES INT Output Indicates number of entries stored in the LIFO FULL BOOL Output Indicates that the LIFO is full and cannot be written to 256 entries EMPTY BOOL Output Indicates that the LIFO is empty 0 entries FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 167 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library FM 352 5 high speed Boolean processor 168 Operating Manual 05 2011 A5E00131318 04 Encoder signals and their evaluation 7 1 Types of encoders Encoder types The FM 352 5 module allows you to connect one of the following encoder types e Differential incremental encoder RS 422 16 bit or 32 bit counter e 24 V single ended incremental encoder 16 bit or 32 bit counter e SSI absolute encoder 13 bit or 25 bit resolution Any inputs that are not required by the encoder type selected are available as general purpose inputs Encoder Interface Signals The following table lists the signals that are used by each encoder and
159. fer to the Operating Instructions SIMATIC S7 300 CPU 31xC und CPU 31x Installation http support automation siemens com WW view en 13008499 1 Set the CPU mode selector to STOP Turn off or disconnect all power to the FM 352 5 module Open the hinged front panel on the right hand side of the module AA O N Unscrew the securing screw of the front connector with a 3 mm screwdriver and then pull it out while holding the grips at the top and bottom Pull firmly to release the catches S Remove the group 1 power supply connector behind the panel on the left hand side of the module The connector block can be taken out O Unscrew the two screws securing the module at the bottom using a 4 5 mm screwdriver N Swing the module up and off the rail FM 352 5 high speed Boolean processor 28 Operating Manual 05 2011 A5E00131318 04 Installing and removing the FM 352 5 3 3 Installing in a stand alone system 3 3 Installing in a stand alone system Mechanical installation For a stand alone system it is recommended that you keep to the same basic installation guidelines and mechanical requirements that are specified for an S7 300 system This installation system meets the safety requirements and provides the grounding mechanical support and resistance to vibration to help ensure proper operation of the FM 352 5 module For additional information on ka a fos and installing modules refer to the Operating In
160. field service personnel to enable diagnostics with an SFC to troubleshoot a problem without requiring the FM 352 5 configuration software to be installed on the target system The following table shows the number of logic modules associated with each advanced parameter Table A 2 Resources of FPGA Used By Advanced Parameters Parameters Logic modules Module diagnostics hardware support Missing auxiliary supply voltage 1L 3 Missing input output supply voltage 2L 11 Encoder sensor supply fault 12 Missing encoder supply voltage 3L 11 SSI frame error 34 Differential incremental encoder RS 422 10 broken wire Output diagnostics hardware support Output overload QO A7 12 each Hardware interrupts hardware support Hardware interrupt 0 7 4 each FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 229 Technical specifications A 6 Function block declaration table A 6 Function block declaration table Overview The following table shows an example of a declaration table with descriptions of each of the input output and static sections Table A 3 Example Declaration Table for the Application FB as displayed in STEP 7 V5 1 Address Declaration Name Type Comment Input section This input is position specific The first 15 bits type BOOL or an array of BOOL but not both You can also assign names to the are digital inputs of th e FM 352
161. ft by the number of bits specified with Conn arrWCon 1 The result is written to Conn arrWCon 2 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 129 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 26 Description SHR_W shift right word The SHR_W shift right word operation is enabled by signal state 1 at the Enable EN input The SHR_W operation is used to shift bits 0 to 15 of input IN bit by bit to the right Bits 16 to 31 are not affected Input N specifies the number of bit positions to be shifted If N is higher than 16 the command writes a 0 at the OUT output The same number N of zeros is shifted from the left in order to occupy the positions which have become free The result of the shift operation can be queried at the OUT output ENO has the same signal state as EN With logic for EN the SHR_W value is retentive requiring storage and a phase clock Table 6 42 SHR_W shift right word LAD representation Parameter Data type Addresses Description EN BOOL Input Enable input ENO BOOL Output Enable output IN WORD Input Value to be shifted N WORD Input Number of bit positions to be shifted OUT WORD Output Result of shift operation ae oni DOut 0 EN Eom O Conn arrWCon 0 IN OUT Conn arrWCon 2 Conn arrWCon 1 N 130 Figure 6
162. g Manual 05 2011 A5E00131318 04 Technical specifications A 6 Function block declaration table Address Declaration Name Type Comment 1 1 stat Reset BOOL Software inputs Incremental encoder reset 1 2 stat Load BOOL Load software input for incremental encoder 2 0 stat Cur_Val DINT Current value for incremental encoder can be changed DINT for 32 bit encoder INT for 16 bit encoder 6 0 stat Load_Val DINT Load value for the encoder DINT or INT can be changed 10 0 stat END_STRUCT If an encoder structure is used it cannot be changed If it is not used it can be deleted Static section These definitions are not position specific The FM 352 5 module recognizes the multiple instance FB from the type CTU16 TP32 etc The FBs are from the library of the FM 352 5 You can assign names to the FBs The types of the FB pin names IN OUT etc must be specified This is required for the connectors can be changed can be changed 48 0 stat UCtr1 CTU16 The 16 bit up counter is a multiple can be changed can be changed can be changed instance of FB121 from the library FM 352 5 60 0 stat DCtr1 CTD16 16 bit down counter FB122 can be changed can be changed can be changed 72 0 stat UDCtr1 CTUD16 16 bit up down counter FB123 can be changed can be changed can be changed 84 0 stat UDCtr2
163. ge 138 FB 113 TP32 Page FB 117 TON16 16 bit on delay timer Page 139 FB 114 TON32 Page FB 118 TOF16 16 bit off delay timer Page 140 FB 115 TOF32 Page FB 119 CP_Gen Page FB 121 CTU16 16 bit up counter Page 142 FB 122 CTD16 16 bit down counter Page FB 123 CTUD16 16 bit up down counter Page FB 120 CTUD32 Page FB 124 SHIFT Bit shift register 1 bit maximum length 4096 FB 125 SHIFT2 FB 126 SHIFT4 145 FB 127 SHIFT8 FB 85 SHIFT16 INT shift register maximum length 256 Page 145 FB 84 SHIFT32 Page 145 FB 104 FMABS32 Page FB 105 FMABS16 Page FB 110 DatSel32 Page FB 111 DatSel16 Page FB 106 FMAdd32 Page FB 107 FMAdd16 Page FB 108 FMSub32 Page FB 109 FMSub16 Page FB 100 FMMul32 Page FB 101 FMMul16 Multiply 16 bits Page 150 FB 102 FMDiv32 Page FB 103 FMDiv16 Page FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 135 Programming and operating the FM 352 5 6 70 Operations in the FM 352 5 Library Description ocates most significant bit set in a DWORD Page 153 ounts set bits ina DWORD Page 154 Packs 16 digital bits into a WORD Page 155 Packs 32 digital bits into a DWORD Page 155 onverts a WORD to 16 digital bits Page onverts a DWORD to 32 digital bits Page elects a bit from a WORD Page 157 Selects a bit from a DWORD Page 157 nserts a bit into an INT 16 bits
164. ght double word operation Page 192 ROL DW Rotate left double word operation Page 133 ROR DW Rotate right double word operation Page 194 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 111 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 1 normally open input Description This operation is in the standard list of STEP 7 operations Table 6 17 NO contact input LAD representation Parameters Data type Addresses Description lt Address gt lt Address gt BOOL Input The address identifies the bit whose signal state is queried 6 9 2 normally closed input Description This operation is in the standard list of STEP 7 operations Table 6 18 Normally closed input LAD representation Parameter Data type Addresses Description lt Address gt lt Address gt BOOL Input The address identifies the bit whose signal 4 state is queried 6 9 3 Output coil Description This operation is in the standard list of STEP 7 operations Table 6 19 Output Coil LAD representation Parameter Data type Addresses Description lt Address gt lt Address gt BOOL Output The address identifies the bit whose signal state is set 112 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 Instructi
165. gital inputs The digital 24 V inputs of the FM 352 5 are standard inputs with minimum filtering You can configure additional filters for the inputs The most rapid response to an input change is achieved when you select the 0 input filter for an input You can select a different filter for each input 24 V quadrature encoder input filtering Quadrature encoders do use input filters The quadrature counter also uses a 3 us delay when the 0 delay filter is set You should specify the same filter for each input of the quadrature encoder If different filters are set counting errors may result References to the quadrature encoder inputs in the user program use the filtered inputs as specified in the parameter settings 5 V RS 422 differential digital input characteristics RS 422 differential inputs are the fastest input type and have the least variation due to the input signal characteristics The RS 422 inputs are typically 0 6 us faster turning on and 2 us faster turning off than the 24 V inputs e 1 1 0 6 us 0 5 us on delay e 2 5 2 us 0 5 us off delay Input filters for SSI encoders SSI encoders do not use any input filters Only the minimum hardware input filter is present for the SSI encoder input signals References to the SSI encoder inputs in the user program use the filtered inputs as specified in the parameter settings FM 352 5 high speed Boolean processor 60 Operating Manual 05 2011 A5E00131318 04 Configuring
166. gnal edge NEG LAD representation Parameter Data type Addresses Description lt Address gt Q BOOL Output One shot output NEG lt Address gt BOOL Input Scanned signal Q M_BIT BOOL Edge abe Edge memory bit that stores the previous signal state of lt address gt M BIT FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 117 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 14 Comparison function CMP Description This operation is in the standard list of STEP 7 operations The operation can be programmed with 16 bit or 32 bit values The comparison function can be used like a normal contact It can be located at any position where a normal contact could be placed IN1 and IN2 are compared according to the type of comparison you choose If the comparison is true the RLO of the function is 1 Table 6 30 Comparison function CMP LAD representation Parameter Data type Addresses Description CMP IN1 INT DINT Input constant First comparison value lt Operator gt IN2 INT DINT Input constant Second comparison value Operator Relational operator INI IN1 is equal to IN2 IN2 IN1 is not equal to IN2 lt gt IN1 is greater than IN2 gt IN1 is less than IN2 IN1 is greater than or equal to IN2 IN1 is less than or equal to IN2 lt FM 352 5 high speed Boolean processor 118 Operating Manua
167. h speed Boolean processor Operating Manual 05 2011 A5E00131318 04 65 Programming and operating the FM 352 5 6 7 Overview 66 H Creating the control program Downloading the program to the FM 352 5 module see section Download program to FM 352 5 module Page 102 e Compile the application FB in the Programming tab e Download program to FM 352 5 module Use STEP 7 to copy the program to the SIMATIC Micro Memory Card ead the SIMATIC Micro Memory Card programming device see section Download program to FM 352 5 module Page 102 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block 6 2 Creating the application function block Editing the Application FB DB Set The application FB is the function block in your main control program that will contain the program instructions for the FM 352 5 module To create a new application FB DB for your FM 352 5 module program follow the steps outlined below 1 In the SIMATIC Manager open the FM 352 5 library and copy the following objects from the Blocks folder to the Blocks folder of the S7 CPU The application FB FB3 the interface FB for the test mode FB30 with DB30 and the interface FB for normal mode FB31 with DB31 Be sure to enter the same FB number in the Application FB box in the F
168. he CPU changes from RUN to STOP and from STOP to RUN again or after the CPU is turned off and on again the original parameters are effective again Parameterization Data Record 1 Dynamic Parameters The dynamic parameters of data record 1 include the enabled diagnostics interrupts and enabled hardware interrupts The following table defines the dynamic parameters in data record 1 that you can modify with SFC 55 Table 6 15 Parameterization Data Record 1 Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 0 M1L M2L ESSF M3L 1 SSIF DBW 2 O7 O6 O05 04 O03 02 01 00 3 MMC 4 PAE7 PAE6 PAE5 PAE4 PAE3 PAE2 PAE1 PAEO 5 6 7 Table legend Name Description of enabling interrupts Value M1L Missing auxiliary supply voltage 1L 0 disable 1 enable M2L Missing input output supply voltage 2L 0 disable 1 enable ESSF Encoder sensor supply fault overload 0 disable 1 enable M3L Missing encoder supply voltage 3L 0 disable 1 enable SSIF SSI frame error 0 disable 1 enable DBW Wire break symm RS 422 incremental encoder 0 disable 1 enable 07 00 Output overload can be enabled individually 0 disable 1 enable FM 352 5 high speed Boolean processor 106 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 7 Controlling dynamic parameters Name Description of enabli
169. he S7 CPU memory areas The following tables show how you declare the address names for use in your FM 352 5 program FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 67 Programming and operating the FM 352 5 6 2 Creating the application function block Interface to the FM 352 5 module Programming the FM 352 5 is the same as programming a function block using the STEP 7 LAD FBD Editor The application FB FB_APP represents the application of the FM and the variable declaration table of the FB represents the FM s resources The input section of the declaration table is used to represent the FM s external inputs The output section is used to represent the FM s external outputs and the static section is used to represent the FM s internal resources External resources of the FM 352 5 module The external resources that are available to the FM 352 5 module s application program consist of the following objects e Interface to the process side 12 digital inputs inputs for the FM application 24 Volt 3 digital inputs inputs to the FM application 5 V differential 8 digital outputs outputs from the FM application e Interface to the S7 300 400 CPU 14 bytes of the CPU output area assigned to the module inputs to the FM application 14 bytes of the CPU input area assigned to the module outputs from the FM application Internal resources of the FM 352 5 module The
170. he basic tasks and tools required to generate and download an application program for the FM 352 5 module Download to PLC Creating the PLC and FM 352 5 programs SIMATIC Manager B a Program and system data Creating the hardware configura tion Assigning param eters to Dialog box Properties of the FM 352 5 _Compile_ FM 352 5 Download module Programming tab to FM 352 5 Gl Figure 5 1 Overview of the tasks These tasks are described in more detail below 1 Create a hardware configuration in STEP 7 HW Config 2 Create the application FB for the FM 352 5 module in the STEP 7 LAD FBD editor and create the FB call in the main program of the PLC 3 Assign parameters to the FM 352 5 module in the Properties dialog 4 Compile the application FB and hardware configuration in the FM 352 5 Properties dialog to generate an SDB for the FM 352 5 module 5 Save and compile the hardware configuration in STEP 7 to generate a system data block for the CPU 6 From STEP 7 download the program blocks and system data to the CPU 7 From the FM 352 5 Properties dialog Programming tab download the SDB containing the application FB and the module parameters to the FM 352 5 module FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 47 Configuring the FM 352 5 module 5 3 Checking the con
171. he reset signal to load the counter with 0 the minimum or maximum value or the load value When the main count direction is set to Count Up the counter behaves in the following ways e t increments to the maximum value then rolls over to the minimum value and holds this value until reset or loaded This rollover is reported in the overflow status bit e t decrements to the lower limit of the counter rolls over to the upper limit and continues counting This rollover is not reported in the overflow or underflow status bits When the main count direction is set to Count Down the counter behaves in the following ways e t decrements to the minimum value then rolls over to the maximum value and holds this value until reset or loaded This rollover is reported in the underflow status bit e It increments to the upper limit of the counter rolls over to the lower limit and continues counting This rollover is not reported in the overflow or underflow status bits The figure below illustrates how single counting functions High count limit Count range upper limit H amp R up up Count range low limit Low count limit up Up count Up count default down Down count Reset value minimum value H Hold is active R Reset is active L Loading is active Figure 7 2 Single counting FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 En
172. hnical specifications A 2 Technical specifications Data for selecting an actuator 5AH11 current sourcing output Output voltage e For signal 1 Min 2L 0 5 V Output current e At signal 1 Nominal value 0 5 A Permitted range 5 mA to 0 6 A e For signal 0 Max 1 0 mA discharge current Total current of the outputs Max 4 A Output delay for resistive load e For wan to o Max 6 us Typically 2 5 us e For QO to man Max 4 us Typically 2 5 us Output dv dt for resistive load e For 1 to 0 Max 15 V us Typically gt 50 V us e For 0 to 1 Max 12 V us Typically gt 39 V us Lamp load Max 5 W Connecting two outputs in parallel For redundant triggering of a load Possible e To increase performance Possible max 1 A resistive only Triggering a digital input Possible Switching frequency e For resistive load Max 20 kHz at 0 5 A max 100 kHz at 0 25A e With inductive loads See Switching frequency for inductive loads Page 220 For lamp load Max 10 Hz Limit internal of the inductive circuit interruption Max L 55 V voltage Typically L 45 V Short circuit protection for the output23 Electronic e Threshold on Typically 1 7 A to 3 5 A FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 209 Technical specifications A 2 Technical speciticati
173. ich size of encoder is configured Comment 38 0 stat Encoders STRUCT Encoder structure Do not change 0 0 stat Direction BOOL Status Direction 0 up count 1 down count 0 1 stat Home BOOL Status 1 encoder is at home position 0 2 stat Homed BOOL Status 1 Home was adopted since power up 0 3 stat Overflow BOOL Status 1 overflow displayed for the duration of one cycle 0 4 stat Underflow BOOL Status 1 Underflow displayed for 1 cycle 0 5 stat SSIFrame BOOL Status SSI frame error or power loss 0 6 stat SSIDataRead BOOL Status 0 SSI encoder has not yet shifted valid data 1 y data available 0 7 stat Open_Wire BOOL Status 1 Encoder has open wire 1 0 stat Hold BOOL Hold software input for incremental encoder 1 1 stat Reset BOOL Reset software input for incremental encoder 1 2 stat Load BOOL Load software input for incremental encoder 2 0 stat Cur_Val DINT Current value for incremental encoder DINT for 32 bit encoder INT for 16 bit encoder 6 0 stat Load_Val DINT Load value for the encoder DINT or INT 10 0 stat END_STRUCT FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 171 Encoder signals and their evaluation 7 2 Counting modes of the incremental encoder 7 2 Counting modes of the incremental encoder Counting Modes The FM 352 5 module supports a 16 bit or a 32 bit incremental e
174. ignal state of bit 31 sign bit of the 32 bit integer This means these bit positions are assigned 0 if the integer is positive and 1 if the integer is negative The result of the shift operation can be queried at the OUT output ENO has the same signal state as EN With logic for EN the SHR_DI value is retentive requiring storage and a phase clock Table 6 40 SHR_DI shift right 32 bit double integer LAD representation Parameter Data type Addresses Description EN BOOL Input Enable input ENO BOOL Output Enable output IN DINT Input Value to be shifted N WORD Input Number of bit positions to be shifted OUT DINT Output Result of shift operation n SHR_DI Dout o EN Eom Conn arrDICon 0 IN OUT Conn arrDICon 1 Conn arrWCon 0 N 128 Figure 6 30 Example of the SHR_DI Shift Right Double Integer Instruction The SHRI box is activated by 1 at DIn 0 Conn arrDICon 0 is loaded and shifted right by the number of bits specified with Conn arrWCon 0 The result is written to Conn arrDICon 1 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 25 SHL_W shift left word Description The SHL_W shift left word operation is activated by signal st
175. indicate that the module has changed to RUN FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Getting started 2 2 Running the FM 352 5 sample program Monitoring program execution in Test mode With the FM 352 5 module in RUN mode you can monitor execution of the sample program In Test mode STEP 7 allows you to use all of its monitoring features to monitor the execution of FB3 e Note that the LEDs for outputs Q6 and Q7 on the module start flashing at the rate of 2 Hz and 1 Hz respectively Each of these outputs is driven by a CP_Gen instruction e Outputs Q0 through Q4 on the module flash simultaneously along with the corresponding CPU_In Bits 0 4 in the VAT table e Interrupts 0 through 4 of the module at addresses M7 0 through M7 4 in the VAT table also flash simultaneously These are driven by OB40 in response to hardware interrupts of the module Switching program execution to Normal mode To switch to Normal mode you have to download the program to the FM 352 5 module and start the interface FB for normal operation as described above 1 Return to HW Config and double click on the FM 352 5 to open the Properties dialog 2 Select the Programming tab and click the Download button During the download to the FM 352 5 the RUN LED green blinks rapidly while the STOP LED yellow is on Once the download has successfully completed the FM 352 5 remains in STOP mode 3 Switch
176. ing Lightning Lightning conductor conductor conductor conductor BVT AD 24 BVT AD 24 BVT AD 24 Transil diode P6KE36A Transil diode P6KE36A P24 M24 Qo M24 Q1 M24 rennin Q7 M24 Figure B 14 Connection diagram for the FM 352 5AH1x OAE0 sourcing outputs FM 352 5 high speed Boolean processor 244 Operating Manual 05 2011 A5E00131318 04 External Protection Circuit for FM 352 5 Boolean Processor o W lt 2 x L lt o N its Re NR Yn uw Lightning Lightning Lightning Lightning conductor jojo O conductor conductor conductor BVT AD 24 BVT AD 24 BVT AD 24 BVT AD 24 Transil diode P6KE36A Transil diode P6KE36A P24 M24 P24 Q0 P24 Q seris P24 Q7 Figure B 2 Connection diagram for the FM 352 5AH0x 0AEO sinking outputs FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 245 External Protection Circuit for FM 352 5 Boolean Processor FM 352 5 high speed Boolean processor 246 Operating Manual 05 2011 A5E00131318 04 Parts lists Parts included with the FM 352 5 The following parts are included with the FM 352 5 module Table C 1 Parts for the FM 352 5 module Part P bus connection expansion bus Description To connect FM module on S7 rail to adjacent module Order number 6ES7390 0AA00 0AA0 2 pin connector For 24 VDC module power supply Label for 40 pin connector To identify input and output signals 6ES73
177. ing more often than the FM 352 5 processor can service them Note This diagnostics interrupt must be enabled before it can be reported 8 5 Digital input Missing input output The 24V input to the FM 352 5 The 24V supply or the wiring sensor or load supply voltage 2L 2L is not present or is below that connects to the FM 352 5 voltage missing The red IOF LED is on specified minimum voltage 2L terminal is faulty incorrect Other I O diagnostics are not The voltage is not 20 4 to valid when this error occurs 28 8V on the 2L terminal Note This diagnostics interrupt The terminals are not screwed must be enabled before it can tight be reported The terminal strip is not seated correctly 13 0 FM positioning Wire break at The FM 352 5 differential Faulty wiring from the broken wire in symmetrical inputs AD AD B B N N FM 352 5 encoder interface to incremental incremental encoder only AD AD only if SSI the encoder encoder RS422 encoder is enabled are not The terminals are not screwed The red IOF LED is on Wired correctly not connected tight or they have incorrect signals Taar The terminal strip is not seated applied ae an i correctly Note This diagnostics In See When no encoder is selected must be enabled before it can 5 be reported or if a differential encoder RS 422 is selected all 6 inputs must be connected to RS 422 compatible output drivers The encoder connecting cables a
178. internal resources that are available to the FM 352 5 module s application program consist of the following objects e Module interrupts e Flip flops e Positive and negative edge detectors e Elements represented by the FBs in the FM 352 5 library timers counters etc e Connectors e Encoder interface e Status information Input section The input section has two entries The first entry consists of the 15 bits representing the digital inputs of the FM s process interface You can declare either 15 individual declarations of the type BOOL each with a unique name which you assign or you can declare an array of BOOL with 15 elements and you name the array The second entry consists of the 14 bytes from the CPU output area This must be declared as a structure with the name CPU_Out its length must be a total of 14 bytes and its position in the declaration table must always be at address 2 However it can be composed of elements of the data types BOOL BYTE WORD INT or DINT with element names that you yourself assign FM 352 5 high speed Boolean processor 68 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block Output section The output section has two entries The first entry consists of the 8 bits representing the digital outputs of the FM s process interface You can declare either 8 individual declarations of the type BOOL each with a unique na
179. ions of the same function You can also use some of the standard STEP 7 bit logic operations such as contacts and coils as you create your program When you have created a project in the STEP 7 environment for your control process you can copy any of the FBs that you intend to use from the program elements to the Blocks directory of your project You can also insert them later as needed while you are creating your program FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 45 Configuring the FM 352 5 module 5 7 Installing the configuration programming software Using STEP 7 with the FM 352 5 46 To configure program and operate the FM 352 5 module you use STEP 7 and the FM 352 5 configuration software to perform the following functions 1 Set up the hardware configuration for your project 2 Set the parameters of the FM 352 5 3 Create edit or test your control program 4 Download the program to the FM 352 5 module First the program is automatically copied to the SIMATIC Micro Memory Card The FPGA is then automatically loaded 5 Set the operating mode of the PLC and or the module 6 Monitor the status of the running program FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Contiguring the FM 352 5 module 5 2 Basic tasks at a glance 5 2 Basic tasks at a glance Overview The following figure shows a simplified representation of t
180. iption The ABS operation writes the absolute value of the number supplied at the IN input to the OUT output The absolute value of a number is the number without its sign Table 6 57 Absolute value FMABS32 and FMABS16 LAD representation Parameter Data type Addresses Description FMABS32 IN INT DINT Input Input value Floating point EN ENO OUT INT DINT Output Output value Absolute value of the floating point number IN OUT Note No logic is allowed at the EN input 6 10 11 Data selector DatSel32 and DatSel16 Description The DatSel operation provides the function of a 2 to 1 multiplexer by copying the value at the IN_A input to output OUT if input Sel is logic 0 or copying the value at the IN_B input to OUT if Sel is logic 1 An N to 1 multiplexer can be created by cascading multiple DatSel operations Table 6 58 Data selector DatSel32 and DatSel16 DatSel32 IN_A INT DINT Input Input value A 1EN ENO IN_B INT DINT Input Input value B NA OUT Sel BOOL Input If 0 the value of IN_A is copied to the output If 1 the value of IN_B is copied to the output Sel OUT INT DINT Output Output value e IN_Aif Sel 0 e IN_Bif Sel 1 IN_B Note No logic is allowed at the EN input FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 147 Programming and operating the FM 352 5
181. is low on the rising edge of A when B is high on the falling edge of B when A is high and on the rising edge of B when A is low The figure below illustrates quadruple evaluation of the signals Siete lt 49 e Fo f E p er SignalB 9 5 _ _____ Up Count pulses Down Count pulses Up Down Figure 7 9 Quadruple Evaluation FM 352 5 high speed Boolean processor 180 Operating Manual 05 2011 A5E00131318 04 Encoder signals and their evaluation 7 6 SSI absolute encoders 7 6 SSI absolute encoders SSI encoder overview Absolute encoders with synchronous serial interface SSI assign a fixed numeric value to each position This value is permanently available and can be read out serially The FM 352 5 module processes Gray code only Multi turn SSI encoders have a frame length of 25 bits The FM 352 5 module can process 24 bits Single turn SSI encoders have a frame length of 13 bits 12 bits of data Delay time Use the Parameters configuration tab to set the delay time for the SSI encoder to 16 32 48 or 64 us For an SSI Master you must select a delay time equal to or greater than the encoder s specified minimum time If you do not know the specification for your encoder select 64 us For an SSI Listen application you must select a delay time equal to or less than the master s delay time Shift Register Frame Length
182. ister Data INT DINT Clock Clock BOOL Input Edge pulse input that moves the data through the shift register Length Length INT Constant Length of the shift register or Range ge one 2 to 4096 SHIFT SHE T4 2 to 2048 SHIFT2 SHIFTS 2 to 1024 SHIFT4 SMF TIG 2 to 512 SHIFT8 rete 2 to 256 SHIFT16 2 to 256 SHIFT32 Out BOOL Output Output of the shift register INT DINT FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 145 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 146 LAD representation SHIFT2 EN ENO Reset Out1 Data1 Out2 Data2 Clock Length LAD representation SHIFT4 EN ENO Reset Out1 Data1 Out2 Data2 Out3 Data3 Out4 Data4 Clock Length LAD representation SHIFT8 ENO Reset Out1 Data1 Out2 Data2 Out3 Data3 Out4 Data4 Outd Data5 Out6 Data6 Out7 Data7 Out8 Data8 Clock Length LAD representation SHIFT16 EN ENO Reset Out Data Clock Length LAD representation SHIFT32 EN ENO Reset Out Data Clock Length FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 10 Absolute value FMABS32 and FMABS16 Descr
183. its inputs and outputs directly available to the S7 CPU allowing you to simulate the program at lower speed and check the wiring After fully testing the application program in Test mode you compile the program to an FPGA image and download the program and module parameter data to the module You can then put the FM 352 5 module into Normal mode operation If a master CPU is controlling the FM 352 5 module the main control program signals the FM 352 5 to begin RUN mode or go to STOP mode via the Interface FB as long as the mode selector switch on the module is set to RUN In a stand alone configuration the module executes its program when you power up the module and set the selector switch to RUN FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 17 Product overview 1 4 Modes of operation Response time during program execution As mentioned above the response time of the FM 352 5 is extremely fast In normal mode the response time is measured as the elapsed time from the change at an input until the setting of an output The calculated response time consists of the following components e Input delay circuit delay filter delay e Program execution time 1 us e Output delay FM 352 5 high speed Boolean processor 18 Operating Manual 05 2011 A5E00131318 04 Product overview 7 5 Overview of the main tasks 1 5 Overview of the main tasks Overview The following table provides
184. jecting If you need more than 4 shield clamps start wiring the rear row of clamps of the shield contact element Note Use a sufficiently long cable between the shield terminal and the front connector of the module This allows you to remove the front connector without needing to release the shield terminal FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Configuring the FM 352 5 module 5 5 1 Installing the configuration programming software Contents of the CD ROM The CD ROM for the FM 352 5 module contains the following e FM 352 5 hardware configuration software including help files and compiler FM 352 5 library of function blocks FBs and associated help files e User manual in PDF format e Sample programs Hardware requirements Read the information on this in the readme file on the CD ROM Starting the Installation Setup The setup program installs the software components in exactly the same way as STEP 7 and other STEP 7 components Select the language you want to use for the installation and follow the instructions as they appear on screen FM 352 5 Function Block Library After installing the software you will find an FM 352 5 library of FBs in the program elements of the STEP 7 LAD FBD editor The FB library contains timers counters shift registers and other operations that are intended for use only with the FM 352 5 module Some of these FBs have 16 bit and 32 bit vers
185. l 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 15 Generate one s complement for 16 bit integer INV_I Description The INV_I operation reads the content of the IN parameter and performs a EXCLUSIVE OR function with the hexadecimal mask W 16 FFFF This operation changes every bit to its opposite state ENO always has the same signal state as EN With logic for EN the INV_ value is retentive requiring storage and a phase clock Table 6 31 Generate one s complement for 16 bit integer INV_I LAD representation Parameter Data type Addresses Description INV EN BOOL Input Enable input JEN ENo ENO BOOL Output Enable output IN INT Input Integer input value 16 bits OU OUT INT Output Ones complement of the 16 bit integer IN Din 0 DOut 0 INV_ EN ENO NOT IN OUT Conn arrlCon 1 Conn arrlCon 0 Figure 6 20 Example of the INV_I Operation If Din 0 1 each bit of Conn arrlCon 0 is inverted for example Conn arrlCon 0 01000001 10000001 becomes Conn arrlCon 1 10111110 01111110 Output DOut 0 is 1 if the inversion is not performed ENO EN 0 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 119 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 16 Description 120 Generate one s
186. le diagnostics 4 Enable disable Enabled Output diagnostics 4 Enable disable Enabled e Hardware interrupts Enable disable Enabled Consistency check 5 Module checks for consistency module Module checks for ignores consistency consistency 1 If the module is set to continue on PLC STOP and 1 The consistency check is disabled The module continues on PLC STOP and stops if the PLC s static parameters do not match the static internal FM parameters The module continues if the parameterization is canceled by the PLC for example by deletion in the hardware configuration 2 The consistency check is enabled The module continues on PLC STOP and stops if the parameters do not match or if the module parameter assignment is canceled 2 When using outputs you must also select the Resume option for the Reaction to CPU STOP parameter in the Basic parameters folder 3 The reset of the incremental encoder counter is activated by the N input if the signal at the N input matches the polarity selected in HW Config in other words when the N input is in the active state Alternatively the reset can also be activated with any other digital input You can set this in HW Config by opening the Properties dialog box and by setting the desired digital input in the Parameters tab under the Encoder 5 V Differential Rotary Transmitter and 24 V Single Rotary Transmitter folder for the parameter Hardware source reset
187. lect the FBs you require for your program and double click or drag them to your application program 4 Change each FB to a multiple instance call Right click on the FB and open the context menu Then select the Change to Multiple Instance Call menu command Enter the name of the multiple instance block as defined in the application FB declaration section Overviews E Libraries fi stdlibs ce Standard Library E i SIMATIC_NET_CP i Fm352 5 Library fF FB3 FM Application Template FM352_5 fe I Debug FM352_5 Bee I_ Normal FM352_5 fen WordPack FM352_5 ba WordCast FM352_5 ba BITSUM FM352_5 ENCODE FM352_5 PERIOD32 FM352_5 ba PERIODI6 FM352_5 ba FREQ32 FM352_5 FRFEMiA FRMAS S Program elements B Call structure Figure 6 5 FM 352 5 library of FBs FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 83 Programming and operating the FM 352 5 6 2 Creating the application function block Addresses of the operations Because the program in the application FB is intended to function in the FM 352 5 module the addresses cannot access any of the S7 CPU memory areas The following table shows the addresses of the operations that can be used in your program Table 6 9 Addresses of the operations Addresses of the operations Declaration section Description Input addresses FM 352 5 inputs Input Digital inputs of the FM 352 5 CPU outputs Input 14 bytes from the CPU as input
188. llowing table shows a summary of the basic steps required to install and configure the FM 352 5 module in an S7 300 system The FM 352 5 module can also be installed in a distributed system using an ET 200M station with an IM153 1 or IM153 2 module but this chapter uses an S7 300 system as an example for the sake of simplicity These steps are described in this chapter Table 5 1 Installing and configuring the hardware Creating the hardware configuration Page bd new project see chapter Setting up the hardware configuration Page Inserting a SIMATIC 300 station see chapter Setting up the hardware Boriguation nfiguration Page 50 e Inserting an S7 300 rack mounting rail e Inserting a power supply module e Inserting the S7 300 CPU Inserting the FM 352 5 module see chapter Setting up the hardware foniga ded nfiguration Page 50 Configuring the FM 352 5 module see chapter Page 52 and Selecting diagnostic parameters Page 55 e Assigning the address and other basic properties Jq IN K I e Configuring the parameters for diagnostic interrupts e Configuring the parameters for modes Saving and compiling the hardware configuration see chapter Saving and ompiling the hardware configuration Page 61 iq FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 49 Configuring the FM 352 5 module
189. locks FBs for the FM 352 5 includes timers counters shift registers a binary scaler and a clock generator that are intended for use only with the FM 352 5 module You can also select a subset of the STEP 7 bit logic operations such as contacts and coils as you create your program Operations of the FM 352 5 software are described in chapter Programmincantl Page 65 You write your program in an application FB Using the FM 352 5 configuration software and STEP 7 the program is compiled and then copied to a SIMATIC Micro Memory Card for non volatile storage The SIMATIC Micro Memory Card is inserted in the slot on the front of the module When the FM 352 5 module is powered up the stored program is retrieved from the SIMATIC Micro Memory Card and executed by the module Operation The FM 352 5 module executes its program independently of the master CPU The integrated inputs and outputs are local functional units and cannot be accessed directly by the master CPU However the user program of the CPU transfers control commands and configuration parameters to the FM 352 5 module and evaluates the status information returned by the module The FM 352 5 module has the following operating characteristics e Recording and control of fast processes for example high speed inspection amp rejection systems or control of high speed machines in the packaging food amp beverage tobacco and personal care product industries e Data exchange
190. master module depending on the power supply required by your encoder If the SSI Master or SSI Listen device is not an FM 352 5 module connect the wiring to the device as recommended in the user manual of the device in question FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 41 Wiring the FM 352 5 4 5 Connecting shielded cables via a shield contact element 4 5 Connecting shielded cables via a shield contact element Application Using the shield contact element you can easily connect all the shielded cables of S7 modules to ground by directly connecting the shield contact element to the rail Design of the Shield Contact Element The shield contact element consists of the following parts e A fixing bracket with two bolts for attaching the shield clamps to the rail order no 6ES7390 5AA00 0AA0 e Shield clamps Depending on the cable cross sections used use one of the shield clamps listed in the following table Table 4 3 Cable cross sections and terminal elements Cable shield diameter Two cables each with a shield diameter of 2 to 6 mm Shield terminal Order no 6ES7390 5AB00 0AAO One cable with a shield diameter of 3 to 8 mm 6ES7390 5BA00 0AA0 One cable with a shield diameter of 4 to 13 mm 6ES7390 5CA00 0AA0 The shield contact element is 80 mm wide with space for two rows each with 4 shield clamps 42 FM 352 5 high speed Boole
191. me which you assign or you can declare an array of BOOL with 8 elements and you name the array The second entry consists of the 14 bytes to the CPU input area This must be declared as a structure with the name CPU_lIn its length must be a total of 14 bytes and its position in the declaration table must always be at address 18 However it can be composed of elements of the data types BOOL BYTE WORD INT or DINT with element names that you yourself assign Static section The static section has a variable number of entries depending upon the amount of internal resources required by your application The first two are required but the remaining are optional and only required if needed in the application program The first entry consists of between 1 and 8 bits representing the module interrupts hardware interrupts You can declare either 1 to 8 individual declarations of type BOOL each with a unique name which you assign or you can declare an array of BOOL with up to 8 elements and you name the array The address of the first declared interrupt must be 32 The second entry in the static section must be the structure named ST with the elements named exactly as shown in the table Example of a declaration table static section at the fixed address 34 This represents the diagnostic status bits generated by the module for use by the application if specific action is required If an encoder is used in the application the third entry i
192. med are reset when the module changes to STOP 172 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Encoder signals and their evaluation 7 2 Counting modes of the incremental encoder Counter Behavior Common to the Three Counting Modes If the counter is loaded with a value outside the count range then the counter counts in the requested direction and rolls over at the upper limit This rollover is not reported in the overflow or underflow status bits Once the counter value is within the specified range it remains within the range until a Load or Reset loads it outside the range The counting process can be started or stopped using the software Hold or Reset signals but the counter is neither held nor reset when the module goes to STOP mode Software controls Reset Hold and Load are cleared by module STOP The counter continues to count based on hardware inputs The counter is not affected when the PLC changes to STOP The current count value can be loaded using the load signal Continuous Counting Mode In the continuous counting mode the count ranges are variable and can be changed e Count range 16 bit counter 32768 to 32767 e Count range 32 bit counter 2 147 483 648 to 2 147 483 647 At power up the counter has a start value of 0 until either the hardware configuration or the software program give it a different starting value You must initialize the counter to a known value with
193. meters folder Configuration since being Parameter data from the PLC Changed is not allowed for FM 352 5 The FM 352 5 hardware configuration has not been compiled and downloaded by 1 FM 352 5 and 2 S7 Hardware Configuration since being changed The runtime parameter assignment data by SFC for the FM 352 5 contains an error 1 4 Set when 0 3 is set The error is external and Use the STEP 7 or FM 352 5 confined to a channel of diagnostics tools to analyze the FM 352 5 problem 2 0 User module Set when SIMATIC A Micro Memory Card has not SIMATIC Micro Memory Card incorrect Micro Memory Card is been detected is missing missing missing Note This diagnostics interrupt The SIMATIC Micro Memory The red MCF LED is must be enabled before itcan Card is not correctly inserted on be reported The SIMATIC Micro Memory Card connectors are dirty FM 352 5 high speed Boolean processor 194 Operating Manual 05 2011 A5E00131318 04 Diagnostics and troubleshooting 8 4 Error correction Byte Bit STEP 7 online FM 352 5 fault error What the diagnostic fault error Possible causes of error message description means 2 2 Faulty module Set when not in RUN The FM 352 5 has been setto The FM 352 5 RUN STOP internal error mode STOP with the RUN STOP selector is in the STOP Note STEP 7 The yellow STOP LED Selector position does not is on The FM 352 5 has not received The PLC RUN STOP select
194. mode broken wire diagnostics checks the signal status of D or D inverse only FM 352 5 high speed Boolean processor 182 Operating Manual 05 2011 A5E00131318 04 Diagnostics and troubleshooting 8 1 Reading the status LEDs Status LEDs The status LEDs on the front of the module indicate the following conditions as described in the table below Table 8 1 Status LED definitions LED label LED Color Description SF Red Indicates a fault condition in the module MCF Red Indicates an error condition in the SIMATIC Micro Memory Card of the module DC5V E Green Indicates the power status of the module IOF E Red Indicates an I O fault condition Output overload missing 2L or 3L broken wire SSI fault RUN E Green Indicates the module is in RUN mode STOP E Yellow Indicates that the module is in STOP mode 10 to 111 E Green Indicates which inputs are on QO to Q7 C Green Indicates which outputs are on 5VF C Red Indicates an overload in the 5 V power supply output 24VF C Red Indicates an overload in the 24 V power supply output FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 183 Diagnostics and troubleshooting 8 1 Reading the status LEDs How the LEDs operate The status LEDs behave as described in the following table depending on the operation being executed Table 8 2 Behavior of status LEDs Ac
195. most variation due to the input signal characteristics The 24 V inputs have an asymmetrical response to the input voltage in other words the input is turned on faster than it is turned off and there is a saturation effect the longer an input is on the longer it takes to turn it off e Turn on time is faster than turn off time turn on time is typically 1 4 us faster than turn off time e Turn on time is faster with a higher voltage input a 20 V input level is typically 0 25 us slower than a 30 V input level e Turn off time is faster with a lower voltage input a 20 V input level is typically 0 6 us faster than a 30 V input level e Turn off time is slower when the input on time is longer Inputs that are on for 0 5 us typically turn off 1 4 us faster than inputs that are on for 6 us The turn off time does not increase for on times greater than 6 us The following table gives the typical ON OFF delays for each input filter Table 5 4 Typical delays for 24 V digital inputs Delay filter ON delay Switch off delay Filter variation 0 1 1 us 2 5 us 0 04 us 5 3 4 us 4 8 us 0 09 us 10 8 2 us 9 7 us 0 25 us 15 13 0 us 14 5 us 0 4 us 20 17 9 us 19 3 us 0 6 us 50 46 9 us 48 3 us 1 6 us 1600 1546 us 1547 us 25 us FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 59 Configuring the FM 352 5 module 5 8 Selecting input filters Filtering 24 V di
196. mple project is also installed in the STEP 7 Sample Projects folder The English sample project is in the following folder e STEP7 EXAMPLES zEn29_01 The sample program will help you become familiar with the steps needed to get a program running on the FM 352 5 module The Blocks folder contains the components for a Getting Started function block that you can copy to your STEP 7 project You can then compile and download to your system to watch a working program execute Note The project contains two application FBs FB3 is a simple Getting Started example and FB10 is a more complex example that uses many of the operations available for the FM 352 5 module Installing and configuring the hardware Follow the steps outlined below to set up the project and configure the hardware for the Getting Started application example 1 Install the FM 352 5 module in a local rack with an S7 3xx CPU 2 Apply power to the CPU and the 1L and 2L connections on the FM 352 5 module 3 Install the FM 352 5 configuration and programming software as described in the section Installing the configuration programming software Page 45 4 Create a STEP 7 project see the section Setting up the hardware configuratio Page 50 5 Create the hardware configuration se the section Setting up the hardware configuratio Page 50 to match the S7 300 CPU and FM 352 5 module as installed in Step 1 above 6 Save and compile the hardwar
197. n the static section must be the structure named Encoder with the elements named exactly as shown in the table Example of a declaration table encoder structure at the fixed address 38 This represents the encoder resources for access by the application The FM 352 5 specific operations represented as FBs in the FM 352 5 library are declared as named static variables of multiple instances These declarations can appear anywhere in the static elements section after the encoder structure as individual declarations These declarations are shown in the table Example of a declaration table FBs of the FB library Flip flops as well as positive and negative edge detectors are represented as static Boolean variables and are declared as a structure named FF and a structure named Edge respectively Both structures can contain any combination of elements of the types BOOL or array of BOOL as required by your application These declarations are shown in the table Example of a declaration table other operations Connections between the elements and intermediate result storage are represented as elements of the structure named Conn that can consist of any combination of elements of data type BOOL INT DINT WORD DWORD with names assigned by you These declarations are shown in the table Example of a declaration table connectors For more information on creating FBs ei Las jie see section 9 Creating logic http support automation
198. ncoder counter The counter can function in one of three modes e Continuous e Single e Periodic These modes are described in this section Selecting Edge or Level Reset The reset function for each of the three counting modes can be set for edge or level This functions as follows e Edge Reset is dominant If Hold and Reset are activated simultaneously the count is reset and then held e Level Hold is dominant If Hold and Reset are activated simultaneously no reset occurs Encoder Status Bits If Hold is removed first the count is reset If both Hold and Reset are removed simultaneously the count is reset If Reset is removed before Hold no reset will occur As described in this section the module returns status bits to indicate the following conditions Counting direction Indicates the direction of the last count Overflow Indicates that the counter has reached the maximum value and exceeded it incremented by 1 The overflow bit is on for one scan cycle Underflow Indicates that the counter has reached the minimum value and exceeded it decremented by 1 The underflow bit is on for one scan cycle Homed Indicates that the encoder has reached its home position since the last power up and that position data is accurate the encoder is synchronized Home Indicates that the encoder is currently at the home position which is defined as a reset of the counter The encoder status bits except for Ho
199. ng interrupts Value MMC Diagnostics for SIMATIC Micro Memory Card 0 disable 1 enable PIl Hardware interrupt can be enabled individually 0 disable 1 enable Note Unused bits are reserved and must be set to 0 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 107 Programming and operating the FM 352 5 6 8 Memory functions 6 8 Memory functions Resetting the Memory Resetting the memory of the FM 352 5 causes the FPGA to read the image from the SIMATIC Micro Memory Card No program memory contents are retained All outputs are turned off and counters and timers are reset To reset the memory of the FM 352 5 module follow the steps outlined below 1 Set the mode switch on the module to the STOP position 2 Set the mode selector to the MRES position see figure below and hold it until the STOP status LED goes off and back on about 3 seconds 3 Release the mode selector allowing it to return to the STOP position 4 Set the mode selector to the MRES position and hold it until the STOP status LED stops flashing SF 1 MCF PG IOF D RUN STOP La RUN STOP MRES 1 2 Programmed SIMATIC Micro Memory Card Mode selector switch Figure 6 19 Resetting the Memory Note The memory reset position MRES is spring loaded with no detent To reset memory 1 2 3 4 Set the mode selector to STOP Set the selector to MRES
200. ns A 6 Function block declaration table Address Declaration Name Output section This output is position specific The first 8 bi the type BOOL or an array of BOOL but not both You can Type ts are digital outputs of the FM 352 5 You can specify a list of also assign names to Comment the outputs 16 0 out DOut ARRAY 0 7 24 V digital outputs of this cycle cannot be can be changed can be changed changed 0 1 out BOOL can be changed Output section The CPU Inputs are outputs from the FM 352 5 module This output is position specific Any combination of BOOL array of BOOL BYTE WORD INT or DINT that totals 14 bytes is allowed You can assign names to the outputs 18 0 out CPU_In STRUCT 14 bytes assigned as inputs and cannot be cannot be changed returned to the CPU changed 0 0 out Bits ARRAY 0 15 5ome can be Boolean can be changed can be changed 0 1 out BOOL can be changed 2 0 out T2_CVasByte BYTE Some can be BYTE can be changed can be changed 3 0 out C1_CVasByte BYTE can be changed can be changed 4 0 out T2_CV INT Some can be INT can be changed can be changed 6 0 out T1_CV DINT Some can be DINT can be changed can be changed DINT must start at 2 6 or 10 10 0 out Enc_CV1 DINT Total structure length must be 14 bytes can be changed can be changed 14 0 out END_STRUCT
201. ntation must be observed All names identified by are registered trademarks of Siemens AG The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described Since variance cannot be precluded entirely we cannot guarantee full consistency However the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions Siemens AG A5E00131318 04 Copyright Siemens AG 2011 Industry Sector 07 2011 Technical data subject to change Postfach 48 48 90026 N RNBERG GERMANY Preface Purpose of this manual This manual describes the purpose features and operation of the SIMATIC S7 FM 352 5 Boolean processor modules order number 6 S7352 5AH01 OAE0 and order number 6ES7352 5AH11 OAE0 This manual also provides support for installing configuring programming and operating FM 352 5 modules Contents of the manual This manual describes the FM 352 5 hardware and the software required to configure and program the modules The manual consists of chapters with instructions and reference information technical specifications This manual covers the following topics e Installing and wiring FM 352 5 modules e Configuring FM 352 5 modules e
202. o mount the FM 352 5 on the rail of an S7 300 controller system For additional information on installing modules refer to the Operating Instructions SIMATIC S7 300 CPU 31xC and CPU 31x Installation http support automation siemens com WW view en 13008499 1 Plug the bus interconnector onto the bus connector of the module to the left of the FM 352 5 The bus connector is on the back of the module and you may need to release the module first 2 If you want to install additional modules to the right first plug the bus interconnector of the next module onto the right bus connector of the FM 352 5 If the FM 352 5 is the last module in the row do not fit a bus interconnector 3 Hook the module onto the rail slide it as far as the module on the left and push it into place at the bottom 4 Tighten the two screws on the bottom of the FM 352 5 applying a torque of between 0 8 and 1 1 Nm to secure the module to the rail 5 After installing the module you can assign a slot number to the FM 352 5 Slot labels are supplied with the CPU Refer to the Operating Instructions SIMATIC S7 300 CPU 31xC und CPU 31x Installation http support automation siemens com WW view en 13008499 for instructions on how to assign and apply slot numbers to the modules Removing the FM 352 5 The description below explains how to remove the FM 352 5 from the rail of an S7 300 controller system For additional information on removing modules re
203. oad button on the FM 352 5 configuration software Programming tab When the download to the FM 352 5 begins the module changes to STOP and copies the downloaded file to the FPGA The SIMATIC Micro Memory Card is not changed by the download The FM 352 5 module remains in Normal mode when the download completes and remains in STOP until the CPU user program calls the interface FB for normal operation FB31 in the FM 352 5 library with a 1 signal at the Run input and the RUN STOP selector in the RUN position With this call the FM 352 5 module begins executing the program that was downloaded to the FPGA The following figure shows the structure of the _Normal FB that is used to call the application FB in normal operation 10 0 10 1 L 256 L 256 DB5 DBBO DB6 DBBO Figure 6 16 96 FM normal instance _Normal EN ENO Run Error OneScan Status LADDR_In LADDR_Out CPU_Out CPU_In Interface FB for Normal Mode Execution M2 0 MW20 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 3 Setting up the interface FB DB data flow in normal mode In normal operation the application FB executed in the FPGA Field Programmable Gate Array of the FM 352 5 module The application FB was compiled and copied to the SIMATIC Micro Memory Card card that is installed in the FM 352 5 module At startup the FPGA reads the image of
204. ogramming and operating the FM 352 5 6 2 Creating the application function block The following figure shows a graphic representation of how inputs and outputs are handled by the multi phase clocking of the FM 352 5 module The total response time is calculated by adding the input delays scan cycle time and output delays as shown in the figure Inputs from the CPU are delayed by the CPU cycle the I O scan and the module s microprocessor scan cycle Outputs to the CPU are delayed by the module s microprocessor scan cycle the I O scan cycle and the CPU scan cycle The previous figure explains the example program logic that determines when the FF MoreFFs x elements are clocked External inputs Input delay input filter delay Iriputs 12 phase code version Inputs i 1 ps 1 2 3 4 J 5 6 7 8 fio 11 0 1 2 Outputs FF MoreFFs 1 Outputs FF MoreFFs 2 Foe Pea External outputs 10 11 Figure 6 13 Multi Phase Clocking and I O Timeline FM 352 5 high speed Boolean processor 92 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 3 Setting up the interface FB DB 6 3 Setting up the interface FB DB Overview The FM 352 5 library contains two Interface FBs that allow the S7 CPU user program OB1 for example to control the mode and operating states of the FM 352 5 module You need to insert an appropriate inte
205. olean processor Operating Manual 05 2011 A5E00131318 04 103 Programming and operating the FM 352 5 6 5 Download program to FM 352 5 module Procedure To copy the program of the FM 352 5 to the SIMATIC Micro Memory Card follow these steps 1 Insert the required SIMATIC Micro Memory Card into the EPROM programming device 2 Select S7 Memory Card kd in SIMATIC Manager or the File gt S7 Memory Card gt Open command to open the S7 Memory Card window 3 Copy the FM 352 5 system data folder containing SDB 32512 from the Blocks folder of the FM 352 5 program to the SIMATIC Micro Memory Card After copying the program to the SIMATIC Micro Memory Card you can insert it in the slot of an FM 352 5 module When the module starts up it loads the FPGA program from the SIMATIC Micro Memory Card and changes to normal operation FM 352 5 high speed Boolean processor 104 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 6 Stand alone operation 6 6 Stand alone operation Requirements Stand alone operation with the FM 352 5 module is possible only after you have completed your program development within the STEP 7 environment and copied a valid program and hardware configuration to the SIMATIC Micro Memory Card using the memory card programmer built into a Siemens PG or an EPROM programming device connected to a PC If a programmed SIMATIC Micro Memory Card is inserted in the FM 352 5 module
206. on be reported 13 4 FM positioning Missing encoder supply The 24 V input to the FM 352 5 Incorrect wiring of the 24 V voltage voltage 3L 3L is not present or is below supply to the FM 352 5 3L monitoring The red IOF LED is on specified minimum voltage terminal 15V Short circuit or overload at the The voltage is not 20 4 to 28 8 5 VDC encoder supply V at the 3L terminal Other FM positioning The terminals are not screwed diagnostics are invalid if this tight error occurs The terminal strip is not seated Note This diagnostics interrupt correctly must be enabled before itcan The 5V DC supply wiring is be reported incorrect Short circuit or overload at the 5 VDC encoder supply 19 2 Channel 0 Channel x is The FM 352 5 output Qx is The connecting wires or the digital output overloaded shorted or has been load have intermittent or short circuit The red IOF LED is on overloaded continuous faults 20 2 Channel1 This diagnostics function is The load is above the 21 2 Channel2 Da T es is maximum current rating enabled and asaut nas The output is switching beyond 22 2 Ch Lins au occurred the maximum specified 23 2 Channel 4 Note This diagnostics interrupt operating frequency 24 2 Channel5 must be enabled before it can 25 2 Channel6 be reported 26 2 Channel7 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 197
207. on Set for LAD Programming 6 9 4 NOT Description This operation is in the standard list of STEP 7 operations Table 6 20 NOT LAD representation Parameter Data type Addresses Description lt Address gt Inverts signal flow negates the RLO bit 6 9 5 Midline output connector Description This operation is in the standard list of STEP 7 operations You must label each connector with a unique element that is declared in the structure Conn Table 6 21 Midline output connector LAD representation Parameter Data type Addresses Description lt Conn abef Conn abel BOOL Conn abel An intermediate assigning element which saves the RLO bit power flow status to a specified element in the Conn structure The midline output element saves the logical result of the preceding branch elements FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 113 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 6 MOVE Description This operation is in the standard list of STEP 7 operations The value specified at the IN input is copied to the address specified at the OUT output With logic for EN the MOVE value is retentive requiring storage and a phase clock Table 6 22 MOVE LAD representation Parameter Data type Addresses Description IN All data types Input Source value with a length of 8
208. on table for the application FB other operations as in STEP 7 V5 1 Address Declaration Name Type Comment Static section This definition is not position specific You can change the names inside the structure except for FF You can use any combination of BOOL and array of the type BOOL 1254 0 stat FF STRUCT Resources for R S and S R Each can be changed cannot be element must be BOOL or an array of changed BOOL 0 0 stat FirstFF BOOL The number of elements can be can be changed can be changed can be changed increased as required 0 1 stat SecondFF BOOL The names of elements can be freely can be changed can be changed can be changed assigned 0 2 stat ThirdFF BOOL can be changed can be changed can be changed 2 0 stat MoreFFs ARRAY 0 15 can be changed can be changed can be changed 0 1 stat BOOL can be changed 4 0 stat END_STRUCT can be changed Static section This definition is not position specific You can nd array of the type BOOL You can use any combination of BOOL a change the names i nside the structure except for Edge 1258 0 stat Edge STRUCT Resources for edge detection Each can be changed cannot be element must be BOOL or an array of changed BOOL 0 0 stat FirstEdge BOOL The number of elements can be can be changed can be changed can be changed increased as required 0 1 stat SecondEdge BOOL can be Th
209. ons 210 Data for selecting an actuator 5AH11 current sourcing output Cable length e Unshielded 100 m e Shielded 600 m 1 Not protected from inductive kickback gt 55mJ 2 The outputs are not protected against reverse voltage if the current is not limited to lt 3 A 3 L2 interruption sufficient to cause the outputs to become invalid but not long enough to signal missing diagnostic will cause output overload diagnostic on any outputs that are on Encoder section Input frequency RS 422 input 1 MHz max 24 V DC input Max 200 kHz Encoder signal evaluation Pulse amp direction x1 x2 x4 Source reset None HW SW HW and SW HW or SW Source reset value Constant 0 min max value load value Reset signal type Edge level Source load value Constant module application Source stop None HW SW HW and SW HW or SW Load value User input or module application Count range minimum User input Count range maximum User input Main count direction Up count down count Hardware source stop Inputs 0 to 14 Hardware source reset Inputs 0 to 14 Counting modes Continuous single periodic Count range 16 bit Count range 32 bit 32768 to 32767 2147483648 to 2147483647 Encoder signals e 5 V RS 422 A A B B and N N e 24V HTL A B and N SSI encoders e SSI signals
210. operating the FM 352 5 6 2 Creating the application function block Table 6 6 This part of the static section contains multiple instance declarations of each FB from the FM 352 5 library as shown in the table below These names can be changed Example of a declaration table for the application FB FBs of the FB library as in STEP 7 V5 1 Address Static section These definitions are not position specific The FM 352 5 module recognizes the multiple instance FB based on the type CTU16 TP32 etc The FBs are from the library of the FM 352 5 You can assign names to the FBs The types of the FB pin names IN OUT etc must be specified This is required for the connectors Declaration Name Type Comment 48 0 stat UCtr1 CTU16 The 16 bit up counter is a multiple can be changed can be changed can be changed instance of FB121 from the FM 352 5 library 60 0 stat DCtr1 CTD16 16 bit down counter FB122 can be changed can be changed can be changed 72 0 stat UDCtr1 CTUD16 16 bit up down counter FB123 can be changed can be changed can be changed 84 0 stat UDCtr2 CTUD32 32 bit up down counter FB120 can be changed can be changed can be changed 102 0 stat TmrP 1 TP32 32 bit timer FB113 can be changed can be changed can be changed 120 0 stat TmrOn1 TON32 32 bit timer FB114 can be changed can be change
211. or provide a the RUN command or has is in the STOP position and the message for received a STOP command FM 352 5 has not been FM module in from the PLC enabled to RUN when PLC STOP mode The FM 352 5 has not received Stops normal operation only a change to the RUN Test The FM 352 5 receives the command at startup Normal RUN command and The parameter setting is for does not have a valid program FM 352 5 to RUN when PLC _ loaded via PG or Stops but it is in the Test SIMATIC Micro Memory Card mode The PLC program does not The FM 352 5 has entered or have all the FM 352 5 interface will not leave the STOP mode FBs and DBs installed and because of a bad parameter or TERIS See the section program error Page 21 in this manual The initial FM 352 5 RUN Test command was not preceded by another command If the parameter assignment error bit DR 0 byte 0 bit 7 is also set take the corrective action for that error code 2 3 Watchdog time Watchdog error The FM 352 5 processor has An internal fault or external out performed an illegal operation EMI has caused a fatal error and has been stopped Restart the FM 352 5 and check whether the error persists If it does the FM 352 5 is either defective or exposed to heavy electrical interference 3 1 Processor Processor self test The FM 352 5 processor did An internal fault or external failure failed not successfully complete EMI has caused a fatal error internal
212. ormation with the master CPU see figure below e Ina distributed configuration the FM 352 5 module functions as a module of a normal ET 200M PROFIBUS DP slave connected to an S7 or non S7 master e The FM 352 5 module can also operate as a stand alone controller independently of any PLC system FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 11 Product overview 1 1 Functions of the FM 352 5 module The FM 352 5 uses an integrated FPGA Field Programmable Gate Array for the simultaneous execution of code in contrast to the sequential execution found in normal programmable controllers This method of execution allows an extremely fast and stable sampling time The module processes and controls a series of integrated inputs and outputs up to 15 inputs and 8 outputs Apart from the normal inputs and outputs the module also supports one of three encoder types differential incremental encoders single ended incremental encoders and SSI absolute encoders If you select SSI absolute encoders or differential incremental encoders the 24 V encoder inputs are available as digital inputs If you do not use any of the encoder interfaces you can represent three digital differential inputs with the connectors for differential incremental encoders SIMATIC Micro Memory Card S7 CPU FM 352 5 Digital pees El in
213. otated by N 1 modulo 32 1 positions The bit positions coming from the right are occupied with the signal state of the bits which have been rotated to the left left rotation The result of the rotation operation can be queried at the OUT output ENO has the same signal state as EN With logic for EN the ROL_DW value is retentive requiring storage and a phase clock Table 6 45 ROL_DW rotate left double word LAD representation Parameter Datatype Addresses Description ROL_DW EN BOOL Input Enable input JEN ENOL ENO BOOL Output Enable output CNN aur IN DWORD Input Value to be rotated N WORD Input Number of bit positions to be N rotated OUT DWORD Output Result of rotation operation 31 16 15 20 IN 11111 0000 1010 1010 0000 1111j 0000 1111 N 3 E 3 digits a our 111 1000 0101 0101 0000 0111 1000 0111 11111 Se ap The released digits are assigned the signal states Those three bits of the three bits shifted out will be lost Figure 6 37 Example of Bit Shifts for the ROL_DW Rotate Left Double Word Instruction Din 0 ROL_DW Dout o en mo Conn arrDWCon 0 IN OUT Conn arrDWCon 1 Conn arrWCon 0 N Figure 6 38 Example of the ROL_DW Rotate Left Double Word Instruction The ROL_DW box is enabled when 1 is set at DIn 0 Conn arrDWCon 0 is loaded and rotated to the left by the number of bits specified with Conn arrWCon 0 The result i
214. per limit it is no longer incremented e The counted value is decremented by 1 on a rising edge at the CD input If the count value reaches the lower limit it is no longer decremented If there is a rising edge at both the CU and CD input in one cycle the counter retains its current value A signal level 1 at the LOAD input presets the counter to the value PV regardless of the values at the CU and CD inputs The signal level 1 at the R input resets the counter to the value 0 regardless of the values at the CU CD and LOAD inputs The QU output indicates whether the current counted value is greater than or equal to the preset value PV The QD output indicates whether the value is less than or equal to zero Table 6 55 Up Down Counter CTUD LAD representation Parameter Data type Addresses Description CU BOOL Input Count up input STUDIS CD BOOL Input Count down input ENG JENGIT R BOOL Input Reset input R is dominant over CU cu aum Load BOOL Input Load input LOAD input is dominant over CD QD CD R CV PV INT DINT Input constant Preset value The counter is preset to PV when the signal level at the LOAD input Load is 1 PV QU BOOL Output Status of the counter QU has the or CTUD32 following value e 1ifCV2 PV e Qin all other situations QD BOOL Output Status of the counter QD has the following value e 1ifCV lt 0 e 0 in all other situations CV INT DINT Output Current count value Possible
215. perating the FM 352 5 6 2 Creating the application function block The following figure shows the word logic operations from the STEP 7 catalog that are valid for the FM 352 5 Overviews x oof New network Gig Bit logic J Comparator 2g Converter H E Counter 68 DB call H E Jumps H E Integer Function H E Floating point Fet HA Move ERETI Program control H E Shift Rotate Gig Status bits H Timers SRE Word logic FB blocks FC blocks Eq SFB blocks Program elements Ez Call structure Figure 6 4 Valid word logic operations from STEP 7 for the FM 352 5 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 81 Programming and operating the FM 352 5 6 2 Creating the application function block Using the FM 352 5 library operations You can also use function blocks that were specially developed for the FM 352 5 module These FBs are located in the FM 352 5 library see figure below To select the FBs that you need for your application program follow the steps outlined below 1 In the operation catalog expand the Library folder then select the FM 352 5 object and expand it 2 Expand the FM 352 5 Library folder The full list of FBs is displayed along with their symbolic names FM 352 5 high speed Boolean processor 82 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block 3 Se
216. puts Module Ci Interface ee OB1 Ee EEE Encoder CPU_Out Output inputs CPU_Out range 14 data bytes Interface 2 control bytes FB for data CPU_In CPU_In exchange between the CPU and 14 data bytes FM 352 5 2 status bytes Outputs aT _ Module H Digital outputs Figure 1 1 Operating the FM 352 5 module as a coprocessor Configuring the hardware You configure the FM 352 5 module using the FM 352 5 Configuration software with the standard Hardware Configuration application of STEP 7 The hardware configuration dialogs for the FM 352 5 module allow you to set the following properties and parameters e Address assignments where you can use the S7 system default assignments or select your own addresses with CPUs that support address selection e Programming parameters where you specify the numbers of the FBs and DBs used to save the program and select the mode e Operating parameters for example interrupts input filters module diagnostics output diagnostics encoder parameters etc FM 352 5 high speed Boolean processor 12 Operating Manual 05 2011 A5E00131318 04 Product overview 1 1 Functions of the FM 352 5 module Programming the FM 352 5 module You program the FM 352 5 module using the FM 352 5 Configuration software with the STEP 7 LAD FBD editor version 5 1 SP3 or greater The FM 352 5 software provides a library of special operations for the Program Elements catalog The library of function b
217. r setting the mode The memory reset position MRES is spring loaded with no detent 8 Slot for SIMATIC Micro Memory Card The SIMATIC Micro Memory Card is inserted into this slot 9 Status LEDs for the module Figure 1 2 Main features of the FM 352 5 module FM 352 5 high speed Boolean processor 14 Operating Manual 05 2011 A5E00131318 04 Product overview 1 2 Physical features of the module Other physical features Other features found on the module as shown in the figure include the following e Three position switch to set the operating mode of the module e Slot for the SIMATIC Micro Memory Card non volatile memory e Removable terminal connector for wiring inputs and outputs Front connector The removable front connector allows the following connection options e 24 V digital inputs 8 inputs up to 12 inputs if the 24 V encoder is not connected e 24 V digital outputs 8 outputs e Connectors for 24 V power supply e Encoder signals A differential incremental encoder RS 422 an SSI absolute encoder or a single ended 24 V incremental encoder HTL e 5V and 24 V connectors to supply power to the encoders Wiring diagram A simplified wiring diagram is provided on the inside of the hinged front panel Labeling strip A labeling strip is supplied with the module You can use this to label the signals connected to the terminal connector The labeling strip is inserted into the recess on the front of the hinged panel
218. rameter Data type Addresses Description ENCODE EN BOOL Input constant Signal state 1 at the enable input EN ENOL activates the box IN DWORD Input constant Variable to be encoded ENO BOOL Output Enable output follows the signal state of EN OUT INT Output Value output Error Information This function does not detect any error states DIn 0 ENCODE DOut 0 EN ENO Not DW 16 12345678 IN OUT M Conn arrlCon 0 OUT gt 28 Figure 6 47 Example of the Encode Binary Position Function If the signal state of input Din 0 is 1 activated the ENCODE function is executed DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 153 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 19 Sum number of bits BITSUM Description The BITSUM function counts the number of bits that are set to a value of 1 in the IN input and returns this as the function s value With logic for EN the BITSUM value is retentive requiring storage and a phase clock Table 6 65 Sum Number of Bits Function LAD representation Parameter Data type Addresses Description BITSUM EN BOOL Input Signal state 1 at the enable input JEN ENO activates the box ENO BOOL Output Enable output has the signal IN OUT state 1 if the function is executed without error IN DWORD
219. rd operation is activated by signal state 1 at the enable EN input and ORs the two word values at IN1 and IN2 bit by bit The values are interpreted as pure bit patterns The result can be scanned at the OUT output ENO has the same signal state as EN With logic for EN the WOR_W value is retentive requiring storage and a phase clock Table 6 34 WOR_W word OR words WOR_W word OR words LAD representation Parameter Data type Addresses Description EN BOOL Input Enable input ENO BOOL Output Enable output IN1 WORD Input First value of the logic operation IN2 WORD Input Second value of the logic operation OUT WORD Output Result word of the logic operation vg en DOut 0 1 EN ENO _ Conn arrWCon 0 IN1 OUT Conn arrWCon 1 W 16 F IN2 122 Figure 6 23 Example of the WOR_W Word OR Word Instruction The operation is executed if DIn 0 is 1 Bits O to 3 are set to 1 all other Conn arrWCon 0 bits are not changed Example Conn arrWCon 0 01010101 01010101 IN2 00000000 00001111 Conn arrWCon 0 OR IN2 Conn arrWCon 1 01010101 01011111 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 19 Description WXOR_W word Exclusive OR words 6 9 Inst
220. re too long The encoder is faulty FM 352 5 high speed Boolean processor 196 Operating Manual 05 2011 A5E00131318 04 Diagnostics and troubleshooting 8 4 Error correction Byte Bit STEP 7 online FM 352 5 fault error What the diagnostic fault error Possible causes of error message description means 13 1 FM positioning SSI frame error The SSI encoder data does not Faulty wiring from the error in The red IOF LED is on Match the expected format for FM 352 5 encoder interface to absolute value the type encoder that was set the encoder encoder The SSI encoder data is not The terminals are not screwed being received by the tight FM 352 5 The terminal strip is not seated Note This diagnostics interrupt correctly must be enabled before itcan The wrong encoder be reported parameters have been selected for the encoder used The encoder connecting cables are too long The encoder is faulty 13 3 FM positioning Encoder sensor supply The 24 V DC or 5 V DC Faulty wiring from the voltage monitor fault overload encoder supply is shorted or FM 352 5 encoder interface to sensing The red IOF LED is on overloaded the encoder and Other FM positioning The encoder is overloading or The red 24VF LED is diagnostics are invalid if this shorting the 24 V DC or 5 V an error occurs DC supply Note This diagnostics interrupt oo must be enabled before it can The red 5VF LED is
221. rface FB call in OB1 to handle the exchange of data between the CPU and the FM 352 5 module If a programmed SIMATIC Micro Memory Card is inserted in the module at startup the FM 352 5 copies the program from the SIMATIC Micro Memory Card to the FPGA sets normal mode and changes to STOP If a programmed SIMATIC Micro Memory Card is not inserted in the module FM 352 5 copies its internal program to the FPGA sets normal mode and changes to STOP If configured to operate in an S7 environment the mode and operating state are decided by the Interface FB and the RUN STOP selector located on the FM 352 5 s front panel FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 93 Programming and operating the FM 352 5 6 3 Setting up the interface FB DB Calling the Interface FB for Test Mode The transition from Normal to Test mode is initiated by the CPU user program calling the interface FB for Test mode FB30 in the FM 352 5 library As a result of this mode change command the FM 352 5 replaces the program in the FPGA with its internal test program To test your application FB using the S7 CPU with the FM 352 5 module in test mode download the following elements to the CPU in addition to the blocks in your regular CPU program e Application FB containing the FM 352 5 program with the up to date instance DB e Interface FB for test mode of the FM with instance DB FB 30 DB 30 in the FM 352 5 library The
222. roubleshooting 8 2 Diagnostic messages Byte Bit Meaning Remarks 13 Wire break at symmetrical incremental SSI or 5 V encoder encoder RS422 SSI frame error SSI encoder selected Encoder sensor supply overload Encoder selected or inputs used AJJ Missing encoder supply voltage 3L Encoder selected or inputs used 14 Encoder diagnostics byte 2 Note When missing encoder supply voltage diagnostics is active inputs 18 to 114 encoder outputs and encoder diagnostics are invalid Output diagnostics channel type 724 15 Channel type 72n Channel type diagnostics 16 8 length of channel in bits Lists the number of diagnostic bits per channel 17 8 channel count Number of successive channels of the same type 18 Channel vector 19 2 Output 0 overload Output diagnostics byte 1 20 2 Output 1 overload Output diagnostics byte 2 21 2 Output 2 overload Output diagnostics byte 3 22 2 Output 3 overload Output diagnostics byte 4 23 2 Output 4 overload Output diagnostics byte 5 24 2 Output 5 overload Output diagnostics byte 6 25 2 Output 6 overload Output diagnostics byte 7 26 2 Output 7 overload Output diagnostics byte 8 27 00 Even byte length filler Note Because it is not possible to sense an overload when an output is off the overload report will be removed three 3 seconds after the overload condition is corrected or the o
223. ruction Set for LAD Programming The WXOR_W word Exclusive OR word operation is activated by signal state 1 at the enable EN input and XORs the two word values at IN1 and IN2 bit by bit The values are interpreted as pure bit patterns The result can be scanned at the OUT output ENO has the same signal state as EN With logic for EN the WXOR_W value is retentive requiring storage and a phase clock Table 6 35 WXOR_W word Exclusive OR words LAD representation Parameter Data type Addresses Description WXOR W EN BOOL Input Enable input lEN ENo ENO BOOL Output Enable output ini souri IN1 WORD Input First value of the logic operation IN2 WORD Input Second value of the logic operation Ha OUT WORD Output Result word of the logic operation cai WXOR_W Dout o EN Eom Conn arrWCon 0 IN1 OUT M Conn arrWCon 1 W 16 F IN2 Figure 6 24 Example of the WXOR_W Word Exclusive OR Word Instruction The operation is executed if DIn 0 is 1 Example Conn arrWCon 0 01010101 01010101 IN2 00000000 00001111 Conn arrWCon 0 XOR IN2 Conn arrWCon 1 01010101 01011010 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 123 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 20 Description WAND_DW word
224. s Conn arrx Conn arrx Con 8 Con 9 DOut 1 a If If J Conn arrX DIn 6 Con 8 __ Il l J Conn arrX CPU_In Bi DIn 6 Con 9 ts 11 I f m Conn arrX Conn arrX CPU_In Bi Con 8 Con 9 ts 12 i J Conn arrX Con 7 TmrP1 CMP gt D EN ENO Conn arrxX Conn arrD DIn 5 _ IN Q F Con 5 ICon 0 N14 CPU_Out T Conn arrD 1_PV PT ET ICon0 ewe E 1 In this network the connectors are referenced before they are output so they are from the previous scan cycle 2 In this network the connector output Conn arrXxCon 8 connects to following references 3 The midline output Conn arrXCon 9 connects to following references Midline outputs are allowed for connectors only 4 Since the connectors in this network are referenced after they are output they are from the same scan cycle and thus they represent a direct connection 5 Connectors can be BOOL DINT BYTE or WORD data types Figure 6 11 Examples of connectors FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 89 Programming and operating the FM 352 5 6 2 Creating the application function block Multi phase clocking 90 The FM 352 5 module uses an onboard processor the FPGA to execute code in parallel rather than sequentially as standard programmable controllers do This method of execution allow
225. s 0 and the RLO was 1 before the operation the RLO will be 1 pulse after the operation and 0 in all other cases The RLO prior to the operation is stored in the address Table 6 26 Detect positive RLO edge LAD representation Parameter Data type Addresses Description lt Address gt lt Address gt BOOL Edge abe Edge memory bit that stores the previous signal state of RLO P 6 9 11 Detect negative edge N Description This operation is in the standard list of STEP 7 operations N detect negative edge detects a signal change in the lt address gt from 1 to 0 and displays it as RLO 1 after the operation The current signal state in the RLO is compared with the signal state of the address the edge memory bit If the signal state of the address is 1 and the RLO was 0 before the operation the RLO will be 1 pulse after the operation and 0 in all other cases The RLO prior to the operation is stored in the address Table 6 27 Detect negative RLO edge LAD representation Parameter Data type Addresses Description lt Address gt lt Address gt BOOL Edge abel Edge memory bit that stores the previous signal state of RLO IN FM 352 5 high speed Boolean processor 116 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 9 12 Description 6 9 Instruction Set for LAD Programming Detect signal positive edge POS This
226. s directory to your program Configure the FM 352 5 module parameters 1 Set basic parameters as described 2 Compile the parameters and program 3 Compile the hardware configuration Prepare the S7 CPU to execute the sample program 1 Download the program to the S7 CPU 2 Setthe CPU switch to RUN 3 Set the FM 352 5 module switch to RUN FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 21 Getting started 2 1 Overview of getting started 22 M Run and monitor program in Test mode v 7 2 Running the sample program i Initiate Test Run mode by using the VAT table as described Monitor program execution by observing the behavior of module LEDs and the VAT table status indicators M Switch from Test to Normal mode 1 2 3 Download the program to the FM 352 5 module Initiate Normal Run mode by using the VAT table as described Monitor program execution in Normal mode as above 1 See chapter Installing and removing the FM 352 5 Page 27 Wiring the FM 352 Page 31 and Configuring the FM 352 5 module Page 45 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Getting started 2 2 Running the FM 352 5 sample program 2 2 Running the FM 352 5 sample program Getting Started application example When you install the FM 352 5 software package a sa
227. s for the FM Connectors Static Similar to bit memories in S7 programs Constants non boolean Module status bits Static Diagnostic interrupts Encoder status bits and current Static Encoder structure Set Cur_Val value to INT or DINT according to size of the configured encoder Output addresses FM 352 5 outputs Output Digital outputs of the FM 352 5 CPU inputs Output 14 bytes from the FM returned as inputs to the CPU Connectors Static Similar to bit memories in S7 programs Hardware interrupts Static Bits that are interpreted as hardware interrupts hardware interrupts that trigger OB40 Encoder control bits and load Static Encoder structure Load Val to value INT or set DINT depending on the size of the configured encoder Midline outputs Connectors Static Similar to bit memories in S7 programs Output operands and midline outputs can be written to only once in the application FB FM 352 5 high speed Boolean processor 84 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block Examples of Input and Output Operands The network in the following figure shows the types of addresses that can be used to label contacts when displayed in LAD Any declared boolean input can be used as a contact Output coils as shown in the figure below can be labeled with any declared boolean outp
228. s an extremely fast and stable sampling time To eliminate runtime differences in the programmed networks multi phase clocking was implemented Multi phase clocking is a technique included in the FM 352 5 translator software to manage the correct time sequencing of retentive elements relative to connectors in the different networks of the application program Twelve clock pulses are available eleven to clock elements with storage flip flops counters etc and the twelfth to clock the outputs The module s 12 phase clock uses the connectors to synchronize the execution of preceding or following elements in the networks The following two rules apply to the FM 352 5 software e fa connector is referenced as an input of an element before it is output this element obtains the connector s value from the previous scan cycle e f a connector is referenced as an input of an element after it is output this element obtains the connector s value from the current scan cycle The use of 12 phase clocking means you can connect up to 11 storage elements in series without worrying about extending the scan cycle time If you insert too many elements in series the software displays an error message that helps you take the necessary action to meet the multi phase clock rules Another advantage of multi phase clocking is that it generates the same logical sequence of the program in the FPGA as when the S7 CPU executes the program in Test mode The re
229. s can be INT can be changed can be changed can be changed 8 0 stat arrlCon ARRAY 0 3 Elements can be an array of INT can be changed can be changed can be changed 2 0 stat INT can be changed 16 0 stat DICon DINT Elements can be DINT can be changed can be changed can be changed 20 0 stat arrDICon ARRAY 0 3 Elements can be an array of DINT can be changed can be changed can be changed 4 0 stat DINT can be changed 36 0 stat END_STRUCT can be changed Temp section This definition is position specific The name cannot be changed 0 0 temp Dummy BOOL Is used where an output coil is required cannot be changed cannot be cannot be by STEP 7 to execute the operation but changed changed is not needed by your program 76 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block Ensuring Data Consistency When transferring data to the FM 352 5 using the 14 bytes you need to consider the following points to ensure data consistency For consistency of data type DINT or less e For data type DINT the address must be 2 6 or 10 in the structure e For data type INT the address must be on an even number boundary e No precautions need to be taken if the data type is BYTE or smaller For consistency of data type greater than DINT A control bit must be used to
230. s of your process to the terminal connector of the FM 352 5 module follow the steps outlined below 1 If you want to route the wires out at the bottom of the module start at terminal 40 or 20 Connect the wires to the terminals in alternating order in other words terminals 39 19 38 18 and so on to terminals 21 and 1 at the top of the terminal strip If you want to route the wires out at the top of the module start at terminal 1 or 21 Connect the wires to the terminals in alternating order in other words terminals 2 22 3 23 and so on to terminals 20 and 40 at the bottom of the terminal strip 2 Always tighten the screws of the unused terminals 3 Attach the cable strain relief assembly around the bundle of wires and the strain relief anchor at the top or bottom of the front connector 4 Tighten the pressure clamp of the strain relief Push the retainer on the strain relief assembly in to the left this will improve utilization of the available space 5 Insert the front connector into the recessed slot in the front of the module Rail guides are keyed to prevent the terminal block from being inserted upside down 6 Tighten the screw from the middle of the front connector This ensures that the front connector is properly seated and connected to the terminal pins in the module 7 Close the front panel 8 Use the labeling strip to identify the signal of each wire connected to the front connector 9 Slide the labeling s
231. s written to Conn arrDWCon 1 DOut 0 is 1 if the operation is executed FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 133 Programming and operating the FM 352 5 6 9 Instruction Set for LAD Programming 6 9 30 Description ROR_DW rotate right double word The ROR_DW rotate right double word operation is enabled by signal state 1 at the Enable EN input The ROR_DW operation is used to rotate the entire contents of input IN bit by bit to the right Input N specifies the number of bit positions for the rotation If N is greater than 32 the double word IN is rotated by N 1 modulo 32 1 positions The bit positions coming from the left are occupied by the signal state of the bits which have been rotated to the right right rotation The result of the rotation operation can be queried at the OUT output ENO has the same signal state as EN With logic for EN the ROR_DW value is retentive requiring storage and a phase clock Table 6 46 ROR_DW rotate right double word LAD representation Parameter Data type Addresses Description EN BOOL Input Enable input ENO BOOL Output Enable output IN DWORD Input Value to be rotated N WORD Input Number of bit positions to be rotated OUT DWORD Output Result of rotation operation 3 16 15 Z0 IN 1010 1010 0000 1111 0000 1111 010 1 0 1 01 N 3 3 digits 134 our 1011 0101 0100 0001 11100001
232. seeaeeeseeaeees 69 14 Comparison TUNGHON CMP sussies AE paddies aE A EAN baa 6 9 15 Generate one s complement for 16 bit integer INV_I cc eeeceeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeeenaees 6 9 16 Generate one s compliment 32 bit double integer INV_DI 6 9 17 WAND_W word AND WOSdS 00 eccceceeeeeeee cee A EE 6 9 18 WOR _W word OR WOI Sinaia an RE NE bedewace bandage vantud s a tedtwacebindzeastaa 6 9 19 WXOR_W word Exclusive OR words 0 ccccceeeeeeeeeeeeeeeeeeeseeeeeeeseneeeeeseeeeeeeteeeaeeeseeaeeeseeaaees 6 9 20 WAND_DW word AND double Words 0 cccccceseeeeeeeeeeeeeeeeeeeeeeeseceeeeeseneeeeeseeeaeeeseeaeeeseenaees 124 6 9 21 WOR_DW word OR double Words 2 0 02 ccccceccceceeseneeeeeeeeeeeeeseeeeeeeseeeeeeeseceeeeeseeeaeeeeeeeaeeeseeaaees 6 9 22 WXOR_DW word Exclusive OR double WOmrds ccccccceceeeeeeeeeeseeneeeeeeeeeeeeseeeeeeeseeaeeeseenaees 6 9 23 SAR shift right 16 bit integer eocssinesnsnean cece ceteeecbaneeseenceteseeeeeteeeeeenteeedsenneeeeecnnens 6 9 24 SHR_DI shift right 32 bit double inteGer ee eee eeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeseeeaeeeseeeeeeseeaeees 6 9 25 SHL W Shift left WOR ess cccc cis cccccsctecte dees ccutezes naccedednsceectbaanecdudecaqdatenadecfuansapesh aa aaa aidian 6 9 26 SAR W Shift right WO ssa a a EA EEA E tanned aA a SEAE 6 9 27 SAL DW shift left double Word socca 6 9 28 SHR_DW shift right double Word sisrerssinianiaiinsnn aaan AN n aN A ANEA AN DE RAN
233. self test on power up Restart the FM 352 5 and check whether the error persists If it does the FM 352 5 is either defective or exposed to heavy electrical interference 3 2 EPROMerror Flash memory The FM 352 5 program An internal fault or external checksum error memory has failed power on EMI has caused a fatal error test Restart the FM 352 5 and check whether the error persists If it does the FM 352 5 is either defective or exposed to heavy electrical interference FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 195 Diagnostics and troubleshooting 8 4 Error correction Byte Bit STEP 7 online FM 352 5 fault error What the diagnostic fault error Possible causes of error message description means 3 3 RAM error RAM test error during FM 352 5 work memory has An internal fault or external startup failed the power on self test EMI has caused a fatal error Restart the FM 352 5 and check whether the error persists If it does the FM 352 5 is either defective or exposed to heavy electrical interference 3 6 Process alarm Setif there is a Hardware interrupts from the The frequency of the hardware lost hardware interrupt FM 352 5 are occurring faster interrupt is too high queue overflow than the PLC can service The program of the interrupt them OB is too long Hardware interrupts to the The PLC is not fast enough FM 352 5 are occurr
234. sistency of program and configuration 5 3 Checking the consistency of program and configuration Consistency check The Consistency check parameter in the Properties di Advanced Parameters tab see section Assigning Properties and Parameters Page 52 prevents the wrong module program from being executed in a system that was configured for a different program The module program and the configuration in the CPU must match to achieve a positive consistency check result If the consistency check fails a diagnostic error and an error in the status word of the module are reported The consistency parameter checks not only the program but also the hardware parameters that are known as static parameters Other parameters known as dynamic parameters can be changed by the program control and do not affect the consistency check Ensuring Consistency The sequence of tasks described in the previous section ensures that the consistency check will be successful If you make any changes to the application FB or to the static parameters for the FM 352 5 module after you have followed the configuration and downloading procedures see overview of the tasks repeat steps 4 5 6 and 7 to restore consistency between the FM module and the PLC Maintaining Consistency The FM 352 5 Properties dialog has a Compile button that creates a special SDB formatted for the FM 352 5 module This special SDB is created from a combination of the applic
235. structions SIMAT 31xC und CPU 31x Installation http support automation siemens See cea Note If the FM 352 5 module detects that another module with an S7 300 bus connector is connected next to it on the rail the FM 352 5 module will not change to stand alone mode Stand alone operation is possible only when no bus connector is connected on either side of the FM 352 5 module Providing the power supplies If you use the S7 300 rail for your stand alone installation you can connect an S7 300 power supply to the rail to provide power for the internal module electronics Wire the S7 300 power supply to the 1L 1M 2L 2M and 3L 3M power terminals of the FM 352 5 module Otherwise you will need to provide power to the module using an external 24 V DC power supply connected to the 1L 1M 2L 2M and 3L 3M power terminals A removable connector is supplied with the module to simplify installation and removal of the power supply wiring Refer to the following chapter for more information on wiring the external power supplies FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 29 Installing and removing the FM 352 5 3 3 Installing in a stand alone system 30 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Wiring the FM 352 5 4 1 Introduction General rules and regulations When operating the FM 352 5 as a component part of a plant or system certain
236. t bit set in a DWORD BITSUM FM 352 5 library Counts set bits ina DWORD BitPack_W FM 352 5 library Packs 16 digital bits into a WORD BitPack_DW FM 352 5 library Packs 32 digital bits into a DWORD BitCast_W FM 352 5 library Converts a WORD to 16 digital bits BitCast_ DW FM 352 5 library Converts a DWORD to 32 digital bits BitPick_W FM 352 5 library Selects a bit from a WORD BitPick_DW FM 352 5 library Selects a bit from a DWORD Bitinsert16 FM 352 5 library Inserts a bit into an INT 16 bits Bitinsert32 FM 352 5 library Inserts a bit into a DINT 32 bits BitShift_W FM 352 5 library Bit shift register length 16 bits BitShift DW FM 352 5 library Bit shift register length 32 bits FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 237 Technical specifications A 7 Valid operations for FM 352 5 module 238 Operation Tanks containers Description WordPack FM 352 5 library Concatenates 2 WORDs into 1 DWORD WordCast FM 352 5 library Converts 1 DWORD into 2 WORDs PERIOD16 FM 352 5 library Period measurement 16 bits PERIOD32 FM 352 5 library Period measurement 32 bits FREQ16 FM 352 5 library Frequency measurement 16 bits FREQ32 FM 352 5 library Frequency measurement 32 bits FIFO16 FM 352 5 library Delete first value 16 bits FIFO32 FM 352 5 library Delete first value 32 bits LIFO16 FM 352 5 library Delete last value 16 bits LIFO32 FM 352 5 library Delete las
237. t double integer WAND_W Word logic operations AND word operation WOR_W Word logic operations OR word operation WXOR_W Word logic operations Exclusive OR word operation WAND_DW Word logic operations AND double word operation WOR_DW Word logic operations OR double word operation WXOR_DW Word logic operations Exclusive OR double word operation SHR_ Shift rotate operations Shift right 16 bit integer operation SHR_DI Shift rotate operations Shift right 32 bit integer operation SHL_W Shift rotate operations Shift left word operation SHR_W Shift rotate operations Shift right word operation SHL_DW Shift rotate operations Shift left double word operation SHR_DW Shift rotate operations Shift right double word operation ROL_DW Shift rotate operations Rotate left double word operation ROR_DW Shift rotate operations Rotate right double word operation BiScale FM 352 5 library Binary scaler TP32 FM 352 5 library 32 bit pulse FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 239 Technical specifications A 7 Valid operations for FM 352 5 module Operation Tanks containers Description TON32 FM 352 5 library 32 bit on delay timer TOF 32 FM 352 5 library 32 bit off delay timer 7P16 FM 352 5 library 16 bit pulse TON16 FM 352 5 library 16 bit on delay timer TOF16 FM 352 5 library 16 bi
238. t off delay timer CP_Gen FM 352 5 library Clock pulse generator CTUD32 FM 352 5 library 32 bit up down counter CTU16 FM 352 5 library 16 bit up counter CTD16 FM 352 5 library 16 bit down counter CTUD16 FM 352 5 library 16 bit up down counter SHIFT FM 352 5 library Bit shift register 1 bit maximum length 4096 SHIFT2 FM 352 5 library Bit shift register 2 bits maximum length 2048 SHIFT4 FM 352 5 library Bit shift register 4 bits maximum length 1024 SHIFT8 FM 352 5 library Bit shift register 8 bits maximum length 512 SHIFT16 FM 352 5 library INT shift register maximum length 256 SHIFT32 FM 352 5 library DINT shift register maximum length 256 FMABS32 FM 352 5 library Absolute value 32 bits FMABS16 FM 352 5 library Absolute value 16 bits DatSel32 FM 352 5 library Data selector 32 bits DatSet16 FM 352 5 library Data selector 16 bits FMAdd32 FM 352 5 library Add 32 bits FMAdd16 FM 352 5 library Add 16 bits FMSub32 FM 352 5 library Subtract 32 bits FMSub16 FM 352 5 library Subtract 16 bits FMMul32 FM 352 5 library Multiply 32 bits FMMul16 FM 352 5 library Multiply 16 bits FMDiv32 FM 352 5 library Divide 32 bits FMDiv16 FM 352 5 library Divide 16 bits ENCODE FM 352 5 library Locates most significant bit set in a DWORD BITSUM FM 352 5 library Counts set bits ina DWORD BitPack_W FM 352 5 library Packs 16 digital bits into a WORD BitPack_DW FM 352 5 library Packs 32 digital bits into a DWORD BitCast_W FM 352
239. t value 32 bits FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Technical specifications FBD Instructions from STEP 7 Program Elements A 7 Valid operations for FM 352 5 module The following table lists the FBD operations that are valid for the FM 352 5 module Operations in italics are function blocks that are available in the FM 352 5 library after you install the FM 352 5 configuration software These FBs are found in the STEP 7 Program Elements catalog in the Libraries container Table A 5 FBD Instructions for FM 352 5 Operation Tanks containers Description gt 1 Bit logic Or gate amp Bit logic AND operation XOR Bit logic Exclusive OR Bit logic Binary input o Bit logic Negation Bit logic Assign Bit logic Midline output RS Bit logic Reset set flip flop SR Bit logic Set reset flip flop N Bit logic Detect negative RLO edge P Bit logic Detect positive RLO edge NEG Bit logic Negative edge detection POS Bit logic Positive edge detection CMP Comparator Comparison operations integer and double integer values only real values are not supported LDI Converter Convert integer 16 bit to double integer 32 bit MOVE MOVE Assign a value INVI Converter Generate one s compliment for 16 bit double integer INV_DI Converter Generate one s compliment for 32 bi
240. ta Record 1 reports channel specific diagnostics The additional bytes are used by data record 1 to report input output and encoder interface diagnostics according to channel types You can use SFC 59 to read this diagnostic data record The following table shows the assignments of diagnostic data record 1 All unlisted bits are insignificant and take the value zero Note Diagnostic information is not updated while the Busy bit of the module status byte is 1 Table 8 4 Assignments of diagnostic data record 1 Byte Bit Meaning Remarks 0 3 Same as data record 0 Input diagnostics channel type FOu Channel type FOu Channel type diagnostics 8 length of channel in bits Lists the number of diagnostic bits per channel 1 channel count Number of successive channels of the same type Channel vector ooINI QIAJA 5 Missing I O supply voltage 2L invalid Note When missing I O supply voltage diagnostics is active inputs 10 to I7 outputs QO to Q7 and I O diagnostics are Encoder interface diagnostics channel type F4n 9 Channel type F4n Channel type diagnostics 10 16 length of channel in bits Lists the number of diagnostics bits per channel 11 1 channel count Number of successive channels of the same type 12 Channel vector FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 187 Diagnostics and t
241. tentive elements are the following e Timers e Counter e Flip flops e Edge detection e Shift register e Binary scaler FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block The following figure shows examples of multi phase clocking of retentive elements with connectors Conn arrX FF ThirdFF Con 2 RS DOut 1 1 R Q T DIn 2 S FF MoreFF FF MoreFF s 0 Conn arrX s 1 DIn 1 RS Con 2 DOut 2 R Q 4 R RS Q I J DIn 2 4S DIn 3 S FF MoreFF Conn arrxX s 2 Con 2 aS DOut 3 1 RQ F DIn 4 4S 1 In this network the Conn arrXCon 2 connector is from the previous scan cycle because it is referenced before it is output ThirdFF is clocked with phase 1 2 In this network MoreFFs 0 is clocked with phase 1 and MoreFFs 1 is clocked with phase 2 The output DOut 2 is clocked with the last phase The midline output connector Conn arrXCon 2 is valid after the phase 1 clock 3 Since Conn arrXCon 2 was set with a midline output between the phase 1 and phase 2 clocks in the network above MoreFFs 2 in this network is assigned to the phase 2 clock Figure 6 12 Examples of Multi phase Clocking of Retentive Elements FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 91 Pr
242. ter size 16 bits 32 bits 16 bits e Source reset None HW SW HW and SW HW or SW None e Source reset value Constant 0 min max value load value Constant 0 e Reset signal type Edge level Edge e Source load value Constant module application Constant e Source stop None HW SW HW and SW HW or SW None e Load value value loaded 215 to 215 1 16 bit counter 0 when load signal is active 2 to 2 1 32 bit counter 0 e Count range Min 215 to 215 1 16 bit counter 0 minimum count value 231 to 231 1 32 bit counter 0 continuous 32768 or 2 147 483 648 215 to 215 1 16 bit counter 32767 Count range Max maximum count value 231 to 231 1 32 bit counter continuous 32767 or 2 147 483 647 2 147 483 647 Main count direction Up count down count Up count Hardware source stop Inputs 0 to 14 Inputs 8 24 V Hardware source reset Inputs 0 to 14 Inputs 11 24 V Polarity of input A 3 Active state 0 active state 1 Active status 1 Polarity of input B 3 Active state 0 active state 1 Active status 1 Polarity of input N 3 Active state 0 active state 1 Active status 1 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 57 Configuring the FM 352 5 module 5 7 Selecting diagnostic parameters 58 Parameters Range of values Default Advanced parameters Modu
243. the corresponding position for each signal on the terminal strip Table 7 1 Encoder signals Encoders Signal Terminal number RS 422 differential incremental Signal A 26 encoder Signal A inverse 27 Signal B 28 Signal B inverse 29 Signal N 30 Signal N inverse 31 24 V differential incremental Signal A 37 encoder HTL Signal B 38 Signal N 39 SSI encoder master mode SSI D data 26 SSI D data inverse 27 SSI CK output shift clock pulse 32 SSI CK output shift clock pulse inverse 33 SSI Encoder Listen mode SSI D data 26 SSI D data inverse 27 SSI CK input shift clock pulse 28 SSI CK input shift clock pulse inverse 29 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 169 Encoder signals and their evaluation 7 1 Types of encoders Encoder Control 170 The following table lists the control signals set with hardware and software that determine how the incremental encoders operate e Select these operating controls in the Parameters tab of the FM 352 5 hardware configuration Properties dialog refer to section Assigning properties and parameters Page 52 e You assign the software controls in your application FB by selecting the appropriate element from the declaration table see table below to use in your program Table 7 2 Operating Controls for Incremental Encoders Encoder parameters
244. ting Manual 05 2011 A5E00131318 04 71 Programming and operating the FM 352 5 6 2 Creating the application function block Assigning Static Elements The static section of the declaration table contains the internal resources of the FM 352 5 module to be used in the program The first two sections consist of 8 hardware interrupt bits and module status bits of the FM 352 5 module as shown in the table below The module status bits cannot be changed Table 6 4 Example declaration table for the application FB static section as in STEP 7 V5 1 Address Declaration to the elements Name Type Static section This definition is position specific The first 8 bits are interpreted as hardware interrupts hardware interrupts that trigger OB40 You can specify a list of the type BOOL or an array of BOOL but not both You can also assign names Comment 32 0 stat Intr ARRAY 0 7 Resources for module interrupts High cannot be changed can be changed can be changed limit fixed Do not change 0 1 stat BOOL can be changed Static section This definition is position specific These are module status bits Do not change 34 0 stat ST STRUCT Resources for module status bits High cannot be changed cannot be limit fixed Do not change changed 0 0 stat FIRSTSCAN BOOL First cycle after a STOP to RUN cannot be changed cannot be cannot be transition ch
245. tions A 5 Switching frequency for inductive loads without commutating diodes FPGA Resources Used by Hardware Support of Diagnostics The parameters listed under Advanced parameters determine whether the FM 352 5 compiler will include the associated diagnostic hardware elements in the compiled FPGA image If the associated diagnostic hardware element is enabled then the parameters listed under Module diagnostics enable Output diagnostics enable and Hardware interrupts enable can be used to individually enable or disable the corresponding event to interrupt the S7 CPU If the associated diagnostic hardware element is not enabled then the dynamic parameters have no effect The default for the hardware support of each of the advanced parameters is enabled box checked If your application does not require a particular diagnostic or Hardware interrupt then you may disable the corresponding advanced parameter which generally makes more logic modules available for the application program Since the FM 352 5 compiler optimizes the logic modules used in the FPGA image by packing unrelated functions into logic modules removing the diagnostic function may not lower the logic module count but it does make space available for packing additional program logic into your application FB It is recommended that you keep the advanced parameters enabled even if you do not use a particular diagnostic as long as your application fits in the FPGA This allows
246. tive LEDs LED Behavior Operation All LEDs Hi E On for 1 second LED test at startup oa RUN a Fast flashing 2 Hz Downloading to the module from the STOP On SIMATIC Micro Memory Card or the PC RUN E Slow flashing 0 5 Hz When module is in Test RUN mode STOP Off RUN Slow flashing 0 5 Hz When module is in Test STOP mode STOP On 184 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Diagnostics and troubleshooting 8 2 Diagnostic messages 8 2 Diagnostic messages Responding to Diagnostic Interrupts If you want your program to respond to an internal or external module fault you can set a diagnostics interrupt that stops the cyclic program of the CPU and calls the diagnostics interrupt OB OB82 Events that can Initiate Diagnostics Interrupts The following events or conditions trigger diagnostics interrupts e Module parameter assignment missing e Error in module parameter assignment e Watchdog time out e Processor failure e Flash memory error e RAM test error during startup You can set the following conditions to trigger diagnostics interrupts e Output overload e External auxiliary voltage missing 1L e Missing input output supply voltage 2L e Missing encoder supply voltage 3L e SSI frame error e Overloaded encoder supply 24 V or 5 V e Wire break RS 422 symmetrical incremental encoders only e SIMATIC Micro Memory Card error e Consistency error
247. tive numbers only since the MOVE operation works without a sign 3 The MOVE operation can be used to convert a current value of the INT data type to the BYTE data type in the CPU input area Figure 6 9 Examples of conversions with the MOVE operation FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 87 Programming and operating the FM 352 5 6 2 Creating the application function block The following figure shows how the MOVE operation can be used to convert data type DINT to INT You can do this only if the DINT value is within the limits for the INT data type You can also convert data type INT to DINT but in order to preserve the sign you need to use the _DI operation MOVE EN ENO Encoder CPU_In CPU_Out Cur_Val SIN OUTP Enc_CV2 Cmplt MOVE EN ENO IN OUT Conn arr DICon 1 Figure 6 10 Example of MOVE and I_DI operations for conversion Connectors CPU_Out Cmpl t L_DI EN ENO Conn arr IN OUT DICon 3 Connectors are a special type of address required by the FM 352 5 to provide control functionality similar to bit memories in standard S7 programs 88 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 2 Creating the application function block The figure below shows how connectors are used with preceding or following element
248. to date information on your products e The documents you need via our Search function in Service amp Support e A forum for global information exchange by users and specialists e Your local partner for Automation and Drives e Information about on site service repairs and spare parts Much more can be found under Services FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 5 Preface FM 352 5 high speed Boolean processor 6 Operating Manual 05 2011 A5E00131318 04 Table of contents Prefaco nana A E E E E E A 3 1 POGUCL OVEIVIGW isseire s E ETE SEE a SE aa E SEE 1 1 Functions of the FM 352 5 Module sssini aiia aa iaeiae eaea 1 2 Physical features of the MOdUIe 2 2 cciceteccatsccsecceneuseceteedecntcshesactaseecetansecsecessneseanstadasleddedeantess 1 3 System COMMQUPATIONS yeec iiss heavier eeeatn aaa 1 4 MGOES OF operatom s isicda sited chee vase dt a eee a a asdedh E 1 5 OVERVICW ofthe MAIN tASKS isaten a ea ener Naaa ai aa a EESE E EE vest 2 Getting started sas ice ei aa aa a aA RE iaia E R E EEES 21 2 1 Overview Of Getting started ss escrios nn aa E NASE EAR A A 2 2 Running the FM 352 5 sample program essssssiierrissrrsniceerrdduinuiecasnaridni neunana nanninannan 3 Installing and removing the FM 352 5 ecccceeeseceeeeeeeceeeeeeeeeeeeeaeeeeeeeaeeeeeeaaeeeeeeeaaseeeeeaaeeeeeeaseeeeenaeeeeeea 27 3 1 Installation rules 2 2 2 ee eeeeceeeeeene cece tenn cece eae ee ee eeaeeeeee
249. trip into the guides on the front door Wiring the power supplies 38 Power supply 1L provides 5 V DC power for the module s internal electronics Connect your 24 V DC power supply to the 1L and 1M terminals on the bottom left side of the module behind the hinged panel Power supply 2L powers the input and output circuits 1 0 to 7 and Q 0 to Q 7 in the module Connect your 24 V DC power supply to the 2L and 2M terminals to provide this power source Power supply 3L powers the encoder interface circuits 1 8 to 14 It also provides a 24 V and a 5 2 V current limited supply to power the encoders Only one of the output supplies can be used at a time Connect your 24 V DC power supply to the 3L and 3M terminals to provide this power source FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Wiring the FM 352 5 4 4 Connecting encoder cables Description 4 4 Connecting encoder cables The following figure shows the pin assignment for an incremental encoder cable available from Siemens and the corresponding connections to the front connector on the FM 352 5 for the 5 V encoder interface The last four characters of the order number specify the cable length 6FX5002 2CA12 0xx0 Incremental encoder cable Terminal Signal 10 M encoder 11 M sensor 12 P encoder 2 P sensor 7 Uas 5 A 6 A 8 B 1 B 3 R 4 R Enclosure Color White yellow White blue White black White red
250. tus byte The bits of the SIMATIC Micro Memory Card status byte defined in the following table allow your program to determine the status of the SIMATIC Micro Memory Card Table 9 10 SIMATIC Micro Memory Card status byte Bit no Definition Module reaction 7 SIMATIC Micro Memory Card 1 SIMATIC Micro Memory Card found error 6 0 Reserved 0 FM 352 5 high speed Boolean processor 204 Operating Manual 05 2011 A5E00131318 04 Technical specifications A A 1 General technical specifications The following technical specifications are described in the Operating Instructions SIMATIC S7 300 CPU 31xC and CPU 31x Installation http support automation siemens com WW view en 13008499 Standards and certifications Electromagnetic compatibility Shipping and storage conditions Mechanical and climatic environment conditions Specifications for insulation tests protection class degree of protection and rated voltage Rated voltages Observing the Design Guidelines SIMATIC products meet the requirements if you observe the design guidelines described in the manuals when installing and operating the equipment Refer also to the installation guidelines regarding lightning safety in section Protection Circuit for FM 352 5 Boolean Processor Page 243 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 205 Technical specifications A 2 Technical specitications A 2 Overview
251. ut or interrupt Intr x CPU_Out Bits 0 CPU_Out Bits 1 Conn arrX DIn 0 Conn XCon DIn 1 DIn 2 Con 31 fr NOT 1 7 DOut 0 CPU_In Bits 1 sk Intr 0 1 Output of the CPU as an input 2 Boolean connector 3 Digital input bit from the module 4 One of eight module interrupts Figure 6 6 Input and output addresses of the FM 352 5 Examples of FBs from the library The following figure shows an example of a 32 bit pulse timer FB113 from the FM 352 5 Library This timer is declared as a multiple instance call in the Stat area Conn arrX TmrP1 cMP gt p Con 7 EN ENO J Conn arrX Conn arrD DIn 5 IN Q FH Con 5 ICon 0 IN1 Conn arrD L 10400 4 IN2 CPU_Out T 4 PT ET F ICon 0 1_PV Figure 6 7 Example of a 32 bit pulse timer from the FBs of the library FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 85 Programming and operating the FM 352 5 6 2 Creating the application function block The following figure shows examples of two shift registers FB124 and FB125 from the FM 352 5 library Each shift register is declared as a separate instance Internal stages cannot be accessed Only the output stage can be accessed inside the program SReg1 EN ENO DIn 0 Reset Out DIn 1 Data DIn 12 Clock 240 Length
252. ut Q1 Sourcing sinking output Green 13 Output Q2 Sourcing sinking output Green 14 Output Q3 Sourcing sinking output Green 15 Output Q4 Sourcing sinking output Green 16 Output Q5 Sourcing sinking output Green 17 Output Q6 Sourcing sinking output Green 18 Output Q7 Sourcing sinking output Green 19 2L Power for section 2 I O circuits 20 2M Ground for section 2 I O circuits 1 FM 352 5AH01 0AE0 has sinking outputs FM 352 5AH11 0AE0 has sourcing outputs 2 On the FM 352 5AH01 OAE0 module terminal 10 is named 2M and serves as ground for section 2 On the FM 352 5AH11 OAE0 module terminal 10 is named 2L and serves as power supply for section 2 The following table lists all terminals on the right side of the terminal connector pins 21 through 40 and the assignment for each terminal Only one encoder interface can be selected and operated at a time If you select either SSI absolute encoders or 5 V differential incremental encoders RS 422 then the 24 V inputs terminals 36 through 39 are available for use as digital inputs 8 through 11 If you select no encoder interface then terminals 26 through 31 are available for use as 5 V digital differential inputs 12 13 and 14 in addition to the 24 V inputs terminals 36 through 39 FM 352 5 high speed Boolean processor 36 Operating Manual 05 2011 A5E00131318 04 Wiring the FM 352 5 4 2 Terminal assignments of the front connector
253. utput is turned off 188 FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Diagnostics and troubleshooting Assignments of diagnostic data record 128 8 2 Diagnostic messages The following table shows the assignments of diagnostic data record 128 You can use SFC 59 RD_REC to read data record 128 for diagnostic information product order number firmware version and module status information Table 8 5 Assignments of diagnostic data record 128 Byte Meaning Remarks 0 27 Diagnostics Same as diagnostic data record 1 28 47 Order number 6ES7 352 5AHXX 0AE0 Product order number for FM 352 5 48 49 Type ID gt 08C1 50 51 Hardware version 52 53 Reserved 54 65 Reserved 66 69 Firmware version number 70 74 FPGA size Number of bytes for FPGA download 75 76 Current loaded FPGA program See note 1 77 78 Module status information See note 2 79 Even byte filler 00 1 This number is the consistency check word as it appears after an FM 352 5 compile and download In Test mode this is the FPGA test program version 2 See status bytes 1 and 2 in Definitions of the Control Bytes and Status Bytes section User data FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 189 Diagnostics and troubleshooting 8 2 Diagnostic messages Wire Break Diagnostics The following table lists some of the possible c
254. utput section as in STEP 7 V5 1 Address Declaration Name Type Comment Output section This output is position specific The first 8 bits are digital outputs of the FM 352 5 You can specify a list of the type BOOL or an array of BOOL but not both You can also assign names to the outputs 16 0 out DOut ARRAY 0 7 24 V digital outputs of this cycle cannot be changed can be changed can be changed 0 1 out BOOL can be changed Output Section The CPU inputs are outputs of the FM 352 5 module This output is position specific Any combination of BOOL array of BOOL BYTE WORD INT or DINT that totals 14 bytes is allowed You can assign names to the outputs 18 0 out CPU_In STRUCT 14 bytes assigned as inputs and cannot be changed cannot be returned to the CPU changed 0 0 out Bits ARRAY 0 15 5ome can be Boolean can be changed can be changed 0 1 out BOOL can be changed 2 0 out T2_CVasByte BYTE Some can be BYTE can be changed can be changed 3 0 out C1_CVasByte BYTE can be changed can be changed 4 0 out T2_CV INT Some can be INT can be changed can be changed 6 0 out T1_CV DINT Some can be DINT can be changed can be changed DINT must start at 2 6 or 10 10 0 out Enc_CV1 DINT Total structure length must be 14 bytes can be changed can be changed 14 0 out END_STRUCT cannot be changed in_out FM 352 5 high speed Boolean processor Opera
255. values 32768 to 32767 for the 16 bit counter 2 147 483 648 to 2 147 483 647 for the 32 bit counter FM 352 5 high speed Boolean processor 144 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 9 Bit shift Registers SHIFT SHIFT2 SHIFT4 SHIFT8 SHIFT16 and SHIFT32 Description The SHIFT operation is available in six versions FB124 through FB127 FB84 and FB85 defined by the number of simultaneously shifted bits When the Clock input changes from 0 to 1 the value at the Data input is shifted into the first stage of the shift register and is shifted again on each subsequent Clock edge The output is set by the last stage in the shift register When the EN and Reset are both on all of the stages of the shift register are reset to 0 Note The SHIFT32 operation requires 2 RAM blocks The SHIFT SHIFT2 SHIFT4 SHIFT8 and SHIFT16 operations each require one RAM block All bit shift registers the LIFO and FIFO operations require RAM blocks The maximum number of RAM blocks supported by the FM 352 5 module is 10 Table 6 56 Bit Shift Registers SHIFT LAD representation Para Data type Addresses Description meter SHIFT Reset BOOL Input A 1 at this input and a 1 at the EN Jen ENOL resets all the stages of the shift register to 0 eset Out Data BOOL Input Data input for the shift reg
256. would require a lengthy period to determine the frequency This operation requires one clock pulse If the module changes to STOP or if EN is inactive the OUT operation is reset Two rising edges must be preset at IN before OUT can be represented PERIOD16 is used to measure periods of 2 to 65535 216 1 microseconds Periods greater than 32767 215 1 microseconds will appear negative VALID will be 0 if the period exceeds 65535 microseconds PERIOD32 is used to measure periods of 2 to 4 294 967 295 252 1 microseconds Periods greater than 2 147 483 647 231 1 microseconds will appear negative VALID will be 0 if the period exceeds 4 294 967 295 microseconds 0000 570 630 VALID 1 0 Time Figure 6 56 Example of PERIOD16 PERIOD32 LAD representation LAD representation Para Data type Addresses Description meter PERIOD16 PERIOD32 IN BOOL Input Input signal EN ENO EN ENO whose frequency is measured VALID BOOL Output Indicates OUT OUT PERIOD is valid OUT INT DINT Output Output of function IN VALID IN VALID FM 352 5 high speed Boolean processor 162 Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 10 Operations in the FM 352 5 Library 6 10 28 Frequency measurement FREQ16 FREQ32 Description This FREQ operation is available in two versions As a 16 bit bit version
257. y Card with 128 KB 512 KB or 2 MB of storage capacity is required to operate the FM 352 5 module To download the SDB to the FM 352 5 module follow these steps 1 Open the FM 352 5 Configuration dialog and select the Programming tab 2 Click the Download button Downloading changes the FM 352 5 module to normal operation When the download to the FM 352 5 begins the module changes to STOP and copies the downloaded file to the FPGA and SIMATIC Micro Memory Card The FM 352 5 module remains in normal operation when the download operation completes and remains in STOP even if the CPU user program continues to attempt to call the interface FB for Test mode possible only in RUN FM 352 5 high speed Boolean processor Operating Manual 05 2011 A5E00131318 04 Programming and operating the FM 352 5 6 5 Download program to FM 352 5 module Running the FM 352 5 module in normal operation To switch FM 352 5 to RUN in normal operation you must set the RUN STOP selector to the RUN position the calls to the interface FB for Test mode must be stopped and the interface FB for normal operation FB31 in the FM 352 5 library must be called with a 1 signal at the Run input by the CPU user program With this call the FM 352 5 module begins executing the program that was downloaded to the FPGA As long as the OneScan input has the 0 signal the FM 352 5 continues to execute the program until one of the following events occur e The interf

Download Pdf Manuals

image

Related Search

Related Contents

DAEnetIP2 - User Manual  Manuale d`uso    Lochinvar CW495-2066 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file