Hello,
I'm still fresh in plc programming so I have still many questions to answer. I searched forum/web for similar topic but i didn't anything similar.
Currently I'm working on project where i need to display a different messages on led display so i created a DB where i saved more preconfigured text(ARRAY) and its length(INT). (see pictures)
In OB1 I call my FB for sending/receiving text to/from LED display with some logic and FC5/FC6 (AG_SEND/AG_RECEIVE) inside. In FB I would like to add a input parameter (probably any pointer) which points to structure message ("TEXT_DB".MSG_12). Inside fb I would then like to modify pointer so it would points on my text("TEXT_DB".MSG_12.TEXT [1..15]) and add another pointer to points on length parameter ("TEXT_DB".MSG_12.TXT_LEN).
I now how to get a DB number, quantity, etc. from a pointer. But I don't know how to get an offset inside DB(Byte,Bits) of a pointer.
Is my request even possible, and if, how could i achieve that? All ideas are welcome.
I'm still fresh in plc programming so I have still many questions to answer. I searched forum/web for similar topic but i didn't anything similar.
Currently I'm working on project where i need to display a different messages on led display so i created a DB where i saved more preconfigured text(ARRAY) and its length(INT). (see pictures)
In OB1 I call my FB for sending/receiving text to/from LED display with some logic and FC5/FC6 (AG_SEND/AG_RECEIVE) inside. In FB I would like to add a input parameter (probably any pointer) which points to structure message ("TEXT_DB".MSG_12). Inside fb I would then like to modify pointer so it would points on my text("TEXT_DB".MSG_12.TEXT [1..15]) and add another pointer to points on length parameter ("TEXT_DB".MSG_12.TXT_LEN).
I now how to get a DB number, quantity, etc. from a pointer. But I don't know how to get an offset inside DB(Byte,Bits) of a pointer.
Is my request even possible, and if, how could i achieve that? All ideas are welcome.