|
|
No special consideration has to be made about these CPU, Settimino has full access to these PLC either directly (with the integrated interface 3xx-PN or 4xx-PN) or via the CPX43 interface.
Connection
Use ConnectTo() specifying IP_Address, Rack, Slot for the first connection, this functions set the internal parameters and connects to the PLC. if a TCP error occurred and a disconnection was needed, for reconnecting you can simply use Connect() which doesn't requires any parameters. Look at the reference of ConnectTo() for a detailed explanation of Rack and Slot.
It’s possible but it’s not mandatory
to specify the connection type via the function SetConnectionType() which
must be called before ConnectTo(). By default the client connects as a PG
(the programming console), with this function is possible change the connection
resource type to OP (the Siemens HMI panel) or S7 Basic (a
generic data transfer connection).
In the hardware configuration (Simatic Manager) of the CPU, under
“Communication” tab, you can change, PLC-side, the connection's distribution,
if you need.
PG, OP and S7 Basic communications are client-server connections, i.e. they
don’t require that the PLC have a connection designed by NetPro.
Note : This is an optimization function, if the client doesn’t connect, the
problem is elsewhere.
Connection type table
Connection Type |
Value |
PG |
0x01 |
OP |
0x02 |
S7 Basic |
0x03..0x10 |
It’s possible, but uncomfortable,
to connect to a S7300/400 PLC using TSAPs (SetConnectionParams() function) as
well.
To do this, use 0x0100 as Local TSAP and follow the next formula for the
Remote TSAP.
RemoteTSAP=(ConnectionType<<8)+(Rack*0x20)+Slot;