Key task


Thread Starter

Lynn Linse

I think the key task is how to allow different "programs" to interact & share data memory. How can a SFC program call sub-programs in Ladder Logic or Javascript or a small PUC (Portable C Compiler) & share data.

If we can figure this out, then the options for the LinuxPLC are wide open.

Maybe we can define a parameter block to share - the caller fills in the "input", calls the sub-program which creates the "output", and continues.
But we should assume both are running concurrently. constantly spawning new sub-tasks will create performance problem (I would assume). We would need some way to define & tag the fields - almost a network issue. We cannot just use shared "C" structures because the sub-program may not be written in C or may be an interpreter of some kind. We'd need to make sure the data moved is 100% unambiguous in form.

We should look at how Foundation Fieldbus and various HMI move data (parameters) between blocks. There must be some clues there.

Best Regards

Lynn August Linse, Senior Product Application Engineer
15353 Barranca Parkway, Lantronix Inc, Irvine CA 92618
[email protected]
Tel: (949)450-7272 Fax: (949)453-7132

LinuxPLC mailing list
[email protected]

Curt Wuollet

Hi Lynn;

That's the reason for a page outside of the OS and the drivers doing type and endian conversion. Anything that can access the memory can overlay it's own structure. Hopefully with the same alignment:^). I could call your C struct a BASIC array and access it. There might be better ways but, Linux calls most of them segfaults. The NFS and VFS code do a lot of this type of thing but, the code is a pretty tough read. There is also the shm IPC but I doubt that anything but C makes that visible to a program. The Linux and UNIX solutions to the problem often involve sockets as many languages now interface to them.

Curt W.

LinuxPLC mailing list
[email protected]