daveInterface
A structure representing the physical connection to a PLC or a network of PLCs (e.g. like MPI).
daveInterface stores all those properties that are common to a network of PLCs:
- The local address used by your computer.
- The speed used in this network.
- The protocol type used in this network.
- A name which is used when printing out debug messages.
The structure daveInterface is created and initialized by daveNewInterface:
daveInterface * di;
di =daveNewInterface(fds, "IF1", localMPI, daveProtoXXX, daveSpeedYYY);
The parameters are:
fds: a _daveOSserialType
a Name
localMPI: the address used by your computer/adapter (only meaningful for MPI and PPI)
daveProtoXXX: a constant specifying the protocol to be used on this interface
daveSpeedYYY: a constant specifying the speed to be used on this interface. (only meaningful for MPI and Profibus)
Protocol types to be used with newInterface:
Name | Meaning |
daveProtoMPI | MPI for S7 300/400 |
daveProtoMPI2 | MPI for S7 300/400, "Andrew's version" |
daveProtoPPI | PPI for S7 200 |
daveProtoISOTCP | ISO over TCP |
daveProtoISOTCP243 | ISO over TCP with CP243 |
daveProtoIBH | MPI with IBH NetLink MPI to ethernet gateway |
MPI/ProfiBus speed constants:
daveSpeed9k |
daveSpeed19k |
daveSpeed187k |
daveSpeed500k |
daveSpeed1500k |
daveSpeed45k |
daveSpeed93k |