Hi everybody!
I'm trying to do quite a simple thing (I think) but I'm stucked and don't know how to implement it...
I call FC6 (DT to DATE) and the RET_VAL parameter I want to use is located at a DBW in a DB with no fixed DB number.
I tried the following code but I got an error, could anybody enlight me and tell how to fix it?
AUF DB [#iDBPlc] // iDBPlc declared as local int
CALL FC 6
IN := #dtDATETIMEPLC // dtDATETIMEPLC declared as local date and time
RET_VAL := DBW30
The date variable was declared at DB2.DBW30 when I ran the code but got an error. When I use RET_VAL := DB2.DBW30 don't get any errors, but it's not flexible the DB number addressing.
Thank you all!
Regards,
Jorge
I'm trying to do quite a simple thing (I think) but I'm stucked and don't know how to implement it...
I call FC6 (DT to DATE) and the RET_VAL parameter I want to use is located at a DBW in a DB with no fixed DB number.
I tried the following code but I got an error, could anybody enlight me and tell how to fix it?
AUF DB [#iDBPlc] // iDBPlc declared as local int
CALL FC 6
IN := #dtDATETIMEPLC // dtDATETIMEPLC declared as local date and time
RET_VAL := DBW30
The date variable was declared at DB2.DBW30 when I ran the code but got an error. When I use RET_VAL := DB2.DBW30 don't get any errors, but it's not flexible the DB number addressing.
Thank you all!
Regards,
Jorge