EMENDOZA
Member
I have a current project replacing S7-200 PLC with S7-1200 PLC (6ES7 215-1AG40-0XB0).
The program conversions are manually created.
I just want to know if I did it right, converting the HSC from S7-200 (see SMB37.png file) to S7-1200.
Since the SMB37 value was set to 16#E8, then the settings must be:
SM37.3 - HSC0 direction control bit: 1 = count up
SM37.5 - HSC0 update the preset value: 1 = write new preset value to HSC0 preset
SM37.6 - HSC0 update the current value: 1 = write new current value to HSC0 current
SM37.7 - HSC0 enable bit: 1 = enable
HSC0 set to mode "9". According to the manual, mode 9 means A/B phase quadrature counter must be used, with input clock A and B (no reset, no start)
..conversion to S7-1200 program
In device configuration -> S7-1200 CPU Properties -> High speed counters (HSC)
- Enable the selected high-speed counter as shown in the attached file (en_hsc.png).
- CV = 1 ; new count value / RV = 1 ; new reference value. See attached file (CTRL_HSC.png)
- Type of counting: Count
- A/B Counter (two clock inputs with phase-shifted pulses, single count value)
- Initial counting direction: Count up
See attached file (function.png)
The program conversions are manually created.
I just want to know if I did it right, converting the HSC from S7-200 (see SMB37.png file) to S7-1200.
Since the SMB37 value was set to 16#E8, then the settings must be:
SM37.3 - HSC0 direction control bit: 1 = count up
SM37.5 - HSC0 update the preset value: 1 = write new preset value to HSC0 preset
SM37.6 - HSC0 update the current value: 1 = write new current value to HSC0 current
SM37.7 - HSC0 enable bit: 1 = enable
HSC0 set to mode "9". According to the manual, mode 9 means A/B phase quadrature counter must be used, with input clock A and B (no reset, no start)
..conversion to S7-1200 program
In device configuration -> S7-1200 CPU Properties -> High speed counters (HSC)
- Enable the selected high-speed counter as shown in the attached file (en_hsc.png).
- CV = 1 ; new count value / RV = 1 ; new reference value. See attached file (CTRL_HSC.png)
- Type of counting: Count
- A/B Counter (two clock inputs with phase-shifted pulses, single count value)
- Initial counting direction: Count up
See attached file (function.png)