S7 sfc58 "wr_rec"

S7PP

Member
Join Date
Sep 2010
Location
Toronto
Posts
134
Hi guys, Happy New Year.

I'm trying to use SFC58 to write data from a DB to the analog output modules, is it possible?

For example if I want to write DB4.DBW0~DBW14 to PQW256~PQW270, how should I write the SFC58?

Is there any other simple way to achive this?
 
I think your are on the wrong track.

SFC58 and SFC59 are for exchanging data with structured "intelligent" devices, such as HART modules. (disclaimer: That is as far as I understand. I have never had use for SFC58 or SFC59 myself).

If the output modules are on Profibus or Profinet, then you could use SFC15 DPWR_DAT.

However, why send to all analog outputs as one block ?
I am guessing you have a scaling function to scale from engineering units to raw analog output format. And that has to be adapted for every single output channel in the program somehow. Simply put the "T PQWxxx" instructions together with the scaling functions. Makes for readable code too.
 
How about SFC20? I believe that I can use it to move I/O value to DB. Do you know whether it works for PIW256 or PQW256 and above? When I write parameter P#PIX280.0 BYTE 16, the system didn't allow me. What should I do? Thanks.
 
How about SFC20? I believe that I can use it to move I/O value to DB. Do you know whether it works for PIW256 or PQW256 and above? When I write parameter P#PIX280.0 BYTE 16, the system didn't allow me. What should I do? Thanks.

Hello S7PP;
Jesper's advice earlier was the simplest and the best you could've had.
Meanwhile, here is why SFC 20 cannot work for you: PIW and PQW areas are not supported.
Here is an extract from the System and Standard Functions manual (available in the Simatic/Documentation folder of the computer where you have installed Step 7):

Copying Memory Area with SFC 20 "BLKMOV"
Description
You use SFC 20 "BLKMOV" (block move) to copy the contents of a memory area (= source area) to another memory area (= destination area).
Permissible source areas are the following:
Parts of data blocks
Memory bits
Process-image partition (part process image) for inputs
Process-image partition (part process image) for outputs

Note: with Siemens docs, understand that if it ain't explicitely permitted, it ain't possible.
Since peripherical addresses (PIW and PQW) are not mentionned, you cannot use them with SFC 20.

Hope this helps,
Daniel Chartier
 

Similar Topics

I'm trying to understand an existed code: Please see the hardware configuration, the motion card has 128 byte input and 128 bytes output from...
Replies
4
Views
1,608
I have a field device (flowmeter) using HART wired to a 200SP HART input card. I need to read flow totalization. Configuring the actual card to...
Replies
2
Views
620
Hi All. Can anyone clarify whether I can use the AG_SEND/RECIEVE blocks between my S7 LEAN Card (via a 318-2 CPU) and a S7-319F 3PN/DP? There...
Replies
3
Views
1,250
If it had a modem it would be damned near ideal. I still have at least half-a-dozen sites I call into using a modem. Besides the Rockwell stuff...
Replies
0
Views
1,269
Hello, I look for list of Data record numbers(index param) for RDREC and I newer found it...I am interested in s7-1200,s7-1500 and s7-300...Can...
Replies
1
Views
1,692
Back
Top Bottom