| 1. Initialize the serial interface: | fd=setPort("/dev/ttyS1","19200",'O') |
| 2. Initialize a daveInterface | di = daveNewInterface(fd,"Some name") |
| 3. Initialize the MPI adapter | error=daveInitAdapter(di)) |
| 4. Initialize a daveConnection | dc = daveNewConnection(di,2); |
| 5. Connect to a PLC with a given MPI address | daveConnectPLC(dc); |
| 6. Exchange data with that PLC | daveReadBytes(dc,daveFlags,0,0,24); |
| | daveWriteBytes(dc,daveFlags,0,0,24,buf); |
| 7. Disconnect from the PLC | daveDisconnectPLC(dc); |
| 8. Disconnect from the Adapter | daveDisconnectAdapter(di); |