Hi,
I'm wondering how to program a function that has an integer(or word) input but return the value contains in the address of the input.
for example, I have a RTD with address of 512, my function gets the input of 512 and gives back the temperature of PIW512.
----------------------
Function getRTD: int;
Var_Input
Addr:int;
end_Var
getRTD:=???????;
End_function
-----------------------
It would be fine if the program is written in LAD or STL. But if you know how, please also tell me how to return a digital I/O's value (probably in byte or word). Thanks!
Best Regards
I'm wondering how to program a function that has an integer(or word) input but return the value contains in the address of the input.
for example, I have a RTD with address of 512, my function gets the input of 512 and gives back the temperature of PIW512.
----------------------
Function getRTD: int;
Var_Input
Addr:int;
end_Var
getRTD:=???????;
End_function
-----------------------
It would be fine if the program is written in LAD or STL. But if you know how, please also tell me how to return a digital I/O's value (probably in byte or word). Thanks!
Best Regards