J
Hi,
I have been working on a project that compliments the Puffin project, it uses a ladder logic interpreter instead of a compiler. For my project
(FreeLC) I am using XML to store and transfer data between different modules. Right now this is the logic engine, and the programming software. Eventually this will also be used to communicate with a Java based HMI. I know that some of the people in the Puffin project have stated an interest in XML, so I am looking for comments or criticisms. I have included a file that I am currently able to import/export from the PLC and the programming software.
Hugh
email: [email protected]
web: claymore.engineer.gvsu.edu/~jackh
--------------------------- XML file ----------------------------------
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE plc SYSTEM "plc.dtd">
<plc>
<memory>
<integer type="output" location="0" size="10" comment="Output
Memory"></integer>
<integer type="input" location="1" size="10" comment="Input
Memory"></integer>
<timer location="4" size="4" comment="Timer Memory">
<set location="0" symbol="WAIT" comment="This is a test timer"
base="0.01" delay="40" accumulator="0"></set>
</timer>
<integer type="integer" location="7" size="5" comment="Integer
Memory">
<set location="0" value="123" symbol="TEST1"></set>
<set location="2" value="456" symbol="TEST2"></set>
</integer>
<string location="9" size="10">
<set location="0" value="SEND #0 \"Test String\""></set>
<set location="1" value="This is a test string to last
\"ferever\""></set>
<set location="2" value="APPEND MEMORY ST9:3 WORM #0"></set>
<set location="3" value="APPEND #0 SEND MEMORY ST9:3"></set>
<set location="4" value="abc"></set>
<set location="5" value="def"></set>
<set location="6" value="ghi"></set>
<set location="7" value="jkl"></set>
<set location="8" value="mno"></set>
<set location="9" value="pqr"></set>
</string>
</memory>
<io>
<serial port="/dev/ttyS1" connection="program 0"></serial>
<serial port="/dev/ttyS0" connection="worm 0"></serial>
<network port="1234" connection="worm 1"></network>
<network port="1235" connection="synchronous"></network>
<card base="0x300" type="das08" comment="DAS08">
<scan memory="N7:0" type="output" channel="AUX"></scan>
</card>
</io>
<program>
<ladder location="2" comment="This is the main program">
<line instruction="SOR" comment="A Test Line"></line>
<line instruction="XIO I1:000/0" comment="A Test Line"></line>
<line instruction="BST"></line>
<line instruction="OTE O0:000/0"></line>
<line instruction="NXB"></line>
<line instruction="MSG ST9:2 R6:0"></line>
<line instruction="BND"></line>
<line instruction="EOR"></line>
<line instruction="SOR"></line>
<line instruction="END"></line>
<line instruction="EOR"></line>
</ladder>
</program>
</plc>
------------------------------------- END of File
------------------------------
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
I have been working on a project that compliments the Puffin project, it uses a ladder logic interpreter instead of a compiler. For my project
(FreeLC) I am using XML to store and transfer data between different modules. Right now this is the logic engine, and the programming software. Eventually this will also be used to communicate with a Java based HMI. I know that some of the people in the Puffin project have stated an interest in XML, so I am looking for comments or criticisms. I have included a file that I am currently able to import/export from the PLC and the programming software.
Hugh
email: [email protected]
web: claymore.engineer.gvsu.edu/~jackh
--------------------------- XML file ----------------------------------
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE plc SYSTEM "plc.dtd">
<plc>
<memory>
<integer type="output" location="0" size="10" comment="Output
Memory"></integer>
<integer type="input" location="1" size="10" comment="Input
Memory"></integer>
<timer location="4" size="4" comment="Timer Memory">
<set location="0" symbol="WAIT" comment="This is a test timer"
base="0.01" delay="40" accumulator="0"></set>
</timer>
<integer type="integer" location="7" size="5" comment="Integer
Memory">
<set location="0" value="123" symbol="TEST1"></set>
<set location="2" value="456" symbol="TEST2"></set>
</integer>
<string location="9" size="10">
<set location="0" value="SEND #0 \"Test String\""></set>
<set location="1" value="This is a test string to last
\"ferever\""></set>
<set location="2" value="APPEND MEMORY ST9:3 WORM #0"></set>
<set location="3" value="APPEND #0 SEND MEMORY ST9:3"></set>
<set location="4" value="abc"></set>
<set location="5" value="def"></set>
<set location="6" value="ghi"></set>
<set location="7" value="jkl"></set>
<set location="8" value="mno"></set>
<set location="9" value="pqr"></set>
</string>
</memory>
<io>
<serial port="/dev/ttyS1" connection="program 0"></serial>
<serial port="/dev/ttyS0" connection="worm 0"></serial>
<network port="1234" connection="worm 1"></network>
<network port="1235" connection="synchronous"></network>
<card base="0x300" type="das08" comment="DAS08">
<scan memory="N7:0" type="output" channel="AUX"></scan>
</card>
</io>
<program>
<ladder location="2" comment="This is the main program">
<line instruction="SOR" comment="A Test Line"></line>
<line instruction="XIO I1:000/0" comment="A Test Line"></line>
<line instruction="BST"></line>
<line instruction="OTE O0:000/0"></line>
<line instruction="NXB"></line>
<line instruction="MSG ST9:2 R6:0"></line>
<line instruction="BND"></line>
<line instruction="EOR"></line>
<line instruction="SOR"></line>
<line instruction="END"></line>
<line instruction="EOR"></line>
</ladder>
</program>
</plc>
------------------------------------- END of File
------------------------------
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc