Lespinoy
Member
Hi All,
I'm trying to write (STL) a function(blok) in S7
I just want to in-output a "byte" and use it in my function as "byte.bit" format. I don't want to use static-vars nor DB's...
The user of the function(blok) should be able to enter a byte (or a "word" or "Dword") on the blok to define a memory area (mb, mw, md) that i can use for "FP" and "PN" (edge detection). So I would want something like this:
I've been trying many different ways, it can't be that difficult, I'm just feeling plain stupid :-(
Please help!!
I'm trying to write (STL) a function(blok) in S7
I just want to in-output a "byte" and use it in my function as "byte.bit" format. I don't want to use static-vars nor DB's...
The user of the function(blok) should be able to enter a byte (or a "word" or "Dword") on the blok to define a memory area (mb, mw, md) that i can use for "FP" and "PN" (edge detection). So I would want something like this:
Code:
function : fc1 : void
title ..
var_in
Input_bit : bool ; //input to handle, assume I0.0
end_var
var_in_out
M_area_byte : byte ; //byte memory (edge), assume MB32
end_var
begin
network
title
A Input_bit //this would be I0.0 and is no problem
FP M_area_byte.7 //this should be interpreted as M32.7
J... (etc...)
end_function
I've been trying many different ways, it can't be that difficult, I'm just feeling plain stupid :-(
Please help!!
Last edited: