View Full Version : Pulse width modulation output on S7-313C
April 17th, 2007, 06:00 AM
Hi, is anyone familiar with the pulse width modulation output on the SIMATIC s7-300 series? I've set up the count module in HW Config, and want to use it to output a pulse with frequency between 0 and 2 000 Hz, but I'm not sure how to set up the SFB 49 Pulse block. A picture of the block is shown below. How do I set the block up to give a frequency between 0 and 2 000 Hz?
Address 300 (hex) means address 752 as set in HW Config.
I'm using a CPU313C.
April 17th, 2007, 08:13 AM
I have not used the FB"Pulse" myself, but the settings look standard (for Siemens, of course).
Look at this extract from the "CPU 31xC Technological functions" (same extract is available in the "Standard and System functions " manual):
The maximum pulse value for a CPU313C digital channel is 2,5 kHz, so 2 kHz is 80% of the max. value. The parameter OUTP_VAL accepts data in 2 formats, eithe 0.0 to 1.0, or standard Siemens analog values, 0 to 27648. If you want your output to be 2 kHz, write a value of 0.8 or 22118 to OUTP_VAL (I have a feeling that the integer value of 22118 will pass better, since OUTP_VAL is registered as an INT).
Of copurse, you can setup a tag to modify the output frequency dynamically, simply write the value required to that tag.
Hope this helps,
April 18th, 2007, 02:59 AM
Hi, thanks for the reply. I'm aware of the input value range required, but the problem is what values to use on the other inputs:
LADDR - W#16#300 (address 768, as configured in HW Config)
SW_EN - TRUE (?)
MAN_DO - TRUE (?)
SET_DO - ?
OUTP_VAL - INT between 0 and 27 648
JOB_REQ - ?
JOB_IQ - ?
JOB_VAL - ?
Here are extracts from help on the function block:
April 19th, 2007, 06:58 AM
The followi ng link will take you to a Siemens FAQ on SFB49, with explanations and a link to an implementation example of the function block (look at the third search result).
Hope this helps,
Note: anytime you have such issues with Siemens, a search on their support website will generally help out. The link I suggested was found on a search for "SFB49".
Hope you will find this useful,