CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

Extract a memory adress from a string value
https://forum.codesys.com/viewtopic.php?f=2&t=7401
Page 1 of 1

Author:  SVAJAN [ Thu Dec 01, 2016 1:00 pm ]
Post subject:  Extract a memory adress from a string value

Hello

I'm new to Codesys software and i have tried to find an answer in the earlier topics.

In my application I'm communicating with a top system via a serial interface, the top system uses the PLC as a database to read and write data, I want to use a 4 byte ASC with the adress value e.g 0100 which i will translate to %R0.100 which is the actual adress to be written or read.

Can I extract the string value and use it as a pointer?


Regards
Svante

Author:  shooter [ Mon Dec 05, 2016 10:39 pm ]
Post subject:  Re: Extract a memory adress from a string value

no you can not make a variable, however you can use an array like arrayQ[100].

Author:  shooter [ Mon Dec 05, 2016 10:40 pm ]
Post subject:  Re: Extract a memory adress from a string value

have a look at www.oscat.de for a library with lots of functions with pointers etc.

Author:  SVAJAN [ Tue Dec 06, 2016 12:17 pm ]
Post subject:  Re: Extract a memory adress from a string value

Ok thanks for the reply, OSCAT seems to a goldmine to be explored.

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/