Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

MPI S7 Protocol

I used MPI S7 protocol example by JlS ( DOC-1330 ). It works fine as long as MPI - address of PLC is "2".

 

With any other address than 2 fault 6201 is delivered back. Initialisation in sub-Vi "MPI-Init" and here in

next sub-Vi "MPI_PLC_connect" produced error 6201. I don't understand why.

If I understand communication correct , than MPI-address of PLC-CPU is not involved because a token is passed to the adapter itself. At the time siemens PC-adapter is master it sends request "02" and waits for DLE "10" and the communication ist started. I have up to now no glue why it doesn't work. 

0 Kudos
Message 1 of 3
(7,731 Views)

In sub VI "MPI_PLC_Connect" answer of first mpi-state-machine is only 8 bytes long instead of 23.

And output ( content of this first mpi-state-mach. ) differs from the expected shown in array at "equal"-

element.

0 Kudos
Message 2 of 3
(7,714 Views)

seriasoneub,

 

I would recommend downloading a trial version of the NI OPC software - connecting to your device and using NI-Spy to view the serial stream accross the NI-VISA serial driver so you can see what is being transferred.

 

http://www.ni.com/opc/

(look for the "Download NI OPC Servers" link)

 

You can compare this stream to what the example program is sending. This will help debug where the problem is.

 

I believe the MPI address is coded into the server and client transactions. Since the example you are using is hard-coded for MPI address 2, you will have to locate where in the stream you need to change the MPI address. 

 

 

 

0 Kudos
Message 3 of 3
(7,708 Views)