Function libraries for IEC61131-3 programs

  • Thread starter Campbell, David (Ex AS17)
  • Start date
C

Thread Starter

Campbell, David (Ex AS17)

Background:
For the last month I have been working on a translator to convert IEC Structured Text (ST) and Instruction List (IL) code into compilable "C" code (the framework allows for other programming languages). I have reached a point where I need to decide on how to handle functions and function blocks (multi in/out blocks).

Problem:
IEC 61131-3 does not define a function prototyping scheme This implies everything needs to be included in the one source file unless we "extend" the IEC standard to enable something
equivalent to "#include" (include an external file) and function prototypes.

If we want to enable function prototypes, how would we handle protyping some of the standard library routines which allow variable number of inlets?

David Campbell

PS: Does anyone have a neat set of BCD <=> integer conversion routines?

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Top