High Speed Counter conversion from S7-200 to S7-1200

EMENDOZA

Member
Join Date
May 2021
Location
Binangonan Rizal
Posts
14
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)

SMB37.PNG en_hsc.PNG CTRL_HSC.PNG function.PNG
 
Not quite correct.


Which firmware version is your CPU?
Why are you using legacy HSC instruction?
Do you know the objective of the program, if yes then do not translate rather interpret. The PLC is quite capable and if it is V4.0 (or 4.sonething, can't remember) then it has the HSC extended instruction which is superior to the one you posted.
All in the hardware manual under technology instructions.
Back to your questions:
CV1 and RV1 are bool tags and work with New_CV and New_RV, you set a bool tag to transfer a new value to the HSC.
 
Last edited:
Not quite correct.


Which firmware version is your CPU?
Why are you using legacy HSC instruction?
Do you know the objective of the program, if yes then do not translate rather interpret. The PLC is quite capable and if it is V4.0 (or 4.sonething, can't remember) then it has the HSC extended instruction which is superior to the one you posted.
All in the hardware manual under technology instructions.
Back to your questions:
CV1 and RV1 are bool tags and work with New_CV and New_RV, you set a bool tag to transfer a new value to the HSC.

It's Firmware version V4.4.
What do you mean by HSC Extended instruction? Should I use an Extended high-speed counter block?
I am a newbie when it comes to high-speed counters.
 
It's Firmware version V4.4.
What do you mean by HSC Extended instruction? Should I use an Extended high-speed counter block?
I am a newbie when it comes to high-speed counters.


Yes, you may still use the one you chose it's not the Ned of the world but the extended instruction offers more functionality, which you may or may not use.
Read the section in the manual and search Siemens support for examples and forums for many helpful answers.


High speed counters are "hardware level" instruction in that they work asynchronously from the CPU scan cycle and there for are consistent.
They count the pulses coming to a specified input and generally used when the pulses are fast enough that using a "software" (not that HSC instruction is not software) counter that is dependent on scan cycle would cause erronon in counts.
There specifics to read about and learn that has to do with the frequency of the pulses and filter time of the HSC and a few other nuances.
The instruction may be set to counter which basically counts the pulses coming in starting from the current counter value which is CV1 and is changeable at runtime.
It could be set for frequency and it would do a conversion over time to provide you with frequency measurement.
It could be set for period (the extended instruction) which is used to measure count value for specified time.
You may generate a hardware interrupt, designed to interrupt the CPU scan to perform urgent task. You do that by assigning a counter value to NEW_RV1(or NewReference1 in the new instruction)


Describe what you need the counter to for further information.
 
Last edited:

Similar Topics

Hello Folks, Has anyone configured a Momentum high speed counter on Unity 13.1. We need the wiring diagram for Momentum High speed counter and...
Replies
0
Views
77
i am bench testing a 1734 -VHSC24 Point I/O High Speed counter module, i cannot find any examples of wiring the outputs from the module. does...
Replies
4
Views
1,393
Hello guys, I have created a program where I count the high speed inputs of a flowmeter and create pulses per second to check the flowrate. Next I...
Replies
5
Views
1,788
Hello to all, I don't have to much experience in the PLC. I'm using the Studio 5000 v32.03 We are trying to measure the length of a product, in...
Replies
3
Views
1,137
Does anyone know how to set the output window on-off values on the fly without having to inhibit the module? I could of sworn when I first started...
Replies
11
Views
2,383
Back
Top Bottom