[?]: CFC problem

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
PLC_ITA
Posts: 265
Joined: Sat May 27, 2006 6:46 am
Location: Europe

[?]: CFC problem

Post by PLC_ITA »

Hello friends, i have only a little experience in CFC.

I want to move a word from ad DB to another DB when a bit is true in CFC

For example in S7 i use the follow sintax :

UN I0.0
SPB xxx
L DB10.DBW20
T DB20.DBW20
xxx:

In this case when Input I0.0 is false the word DB20.DBW20 is'nt overwrite and is possible to write for example, from a MP277

In CFC is not possible to do this because if i create a FC or FB i have always an out from the block and always owerwrite my word.

How i can do to resolve this problem ? what do you suggest ?

thank you
krcedinac
Posts: 54
Joined: Tue Apr 04, 2006 7:08 am
Location: Serbia

Post by krcedinac »

For example with the word it can be done like this:
Image

Code for the Word to Real conversio function Conv_W_R is:

L #Word_IN
ITD
DTR
T #Out_data

OP_A block that passes real value when ti boolean input is on I think can be found in standard librarys.

You can think various ways to do it... this is just idea.