Hi folks,
ok here's one... can I use indirect addressing with a function block call? And can I do it within a loop. I don't think the loop is a problem but not sure about the FB. Basically I was thinking of including the call in an existing loop to save typing, it may have made performance a bit better too, but I therefore need to indirectly address the parameters of the function. Here's the gist of it.
Thanks in advance
Kenny
ps: all the parameters after the call statement are coming up invalid
ok here's one... can I use indirect addressing with a function block call? And can I do it within a loop. I don't think the loop is a problem but not sure about the FB. Basically I was thinking of including the call in an existing loop to save typing, it may have made performance a bit better too, but I therefore need to indirectly address the parameters of the function. Here's the gist of it.
Code:
OPN "Vacuum values" DB7
L 0
LAR1
LAR2
L 17
strt: T #COUNT
L PIW [AR1,P#512.0]
T DBW [AR2,P#2.0]
CALL "Vacuum controller" , "Vacuum parameters" FB1 / DB8
setpoint := DBW [AR2,P#0.0]
actual := DBW [AR2,P#2.0]
gain := DBD [AR2,P#6.0]
integral := DBD [AR2,P#10.0]
diff := DBD [AR2,P#14.0]
signal_out:= DBD [AR2,P#4.0]
L DBW [AR2,P#4.0]
T PQW [AR1,P#514.0]
+AR1 P#4.0
+AR2 P#20.0
L #COUNT
LOOP strt
NOP 0
Thanks in advance
Kenny
ps: all the parameters after the call statement are coming up invalid
Last edited: