Pulse width modulation output on S7-313C

dfdgdsd

Member
Join Date
Apr 2007
Location
Home
Posts
12
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?

53016550ue4.png


Address 300 (hex) means address 752 as set in HW Config.
I'm using a CPU313C.
 
Hello dfdgdsd;


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):

FB49_outputval.jpg



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,
Daniel Chartier
 
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 - ?

Any suggestions?

Here are extracts from help on the function block:
83485066dm3.png

92855484zx5.png
 
Hello dfdgdsd;

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).

http://support.automation.siemens.com/WW/llisapi.dll?query=SFB49&func=cslib.cssearch&content=skm%2Fmain.asp&lang=en&siteid=cseus&objaction=cssearch&searchinprim=0&nodeid0=4000024

Hope this helps,
Daniel Chartier

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,
D.C.
 

Similar Topics

Hey guys, I have a client that has a v-notch chlorinator that doesn't run off a 4-20mA loop, it instead has two discrete inputs that drive the...
Replies
6
Views
1,865
Help me. I want to create a PLC program Pulse width modulation (PWM) with Simatic PLC s7300. using SFB49. but I have never made it. is there who...
Replies
0
Views
2,570
Hi, I am trying to write a ladder logic using PWM and INI instructions to actuate a fast switching solenoid valve at a range of frequencies. I...
Replies
9
Views
11,258
how can I change an analog output just with the program not using a digital input? also I need to ramp up and ramp down the analog output please...
Replies
5
Views
4,180
Hi, I have Siemens PlC and I am trying to write program in SCL or other language. This program shut regulate temperature using pulse width...
Replies
4
Views
10,310
Back
Top Bottom