Studio5000 TCP message configuration/CIP generic/Instance???

Hello, PLCS.net guys.

I'm learning about MSG for TCP communication recently.
I'm trying to use CIP Generic.
And the main flow is like the one below based on the manual.

SocketCreate
→OpenConnection(using the Instance generated on SocketCreate)
→WriteSocket(using the Instance generated on OpenConnection)

And I made the variable for the SocketCreate Instance.
But
・I can't use the variable for OpenConnectoion. The instance of the service accepts only integer.
・OpenConnection doesn't generate the instance. How can WriteSocket use the instance?

Could you give me some advice if you know something?

Thank you.
 
OpenConnection doesn't use the destination element.
And it does not return any data.(the explanation of the OpenConnection)

But ReadSocket/WriteSocket on the manual, its instance uses one returned from OpenConnection.

?

Thanks for the reply.
 
Read/Write Socket for clients uses Instance returned by Create
Read/Write Socket for servers uses Instance returned by Accept

Publication ENET-AT002, page 28:
Instance
This service uses the instance that is returned from the CreateConnection service. However, when accepting a connection via the
AcceptConnection service, use the instance that is returned from this AcceptConnection service as the ReadSocket instance.


In your example you have a Client, so you have to use Instance from Accept.

Manual pub ENET-AT002 page 24 said:
Use a MOV instruction to move the instance to another MSG tag (the .Instance field).
MOV instruction moves a value between different data types.
You can also use BTD instruction to handle Instances higher that 32767 properly.
As a test and learning, I would recommend you to use Rockwell technote Answer ID 32962
 
>>Contr_Conn

Thanks for your good advice!
I didn't know MOV can move the MSG instance.
I confirmed I could do it.
But still, MSG OpenConnection and WriteSocket request some integer instance(it doesn't allow blank or variable)
Is there some dummy integer setting?
Or if MOV writes some instance, Does the OpenConnection igonore the integer instance?

Also, If possible, could you send me the "Rockwell technote Answer ID 32962" screenshot to me?
Maybe the page is only for Rockwell Techconnect customers.
And I'm not.

I hope other PLC makers don't become like Rockwell.

So if you could, please give me the information.
Thank you.

Any advice is welcome.
 
I got it eventually.

On the Message Configuration, the input field of Instance for OpenConnection is unnecessary.

MOVE rewrites the instance anyway.

Thank you, Contr_Conn
 

Similar Topics

Hello, I've recently created a simple AOI in my program which converts from one UDT to a string. It's basically just converting DINT to STRING and...
9
Replies
630
Views
Hello everyone, I’m not looking for a full lesson—I’m currently enrolled in a modular PLC training course and may be getting a bit ahead of...
2
Replies
355
Views
Hi, I've ran into an an issue with some calibration of the analog input on a 1794-1F2XOF2I/A. I can calibrate it fine and it reads correctly but...
9
Replies
602
Views
Is there a way to get Studio5000 to Run on Lookout? Long story short, we have 28 SLC 5/05 PLC's we want to change out to CompactLogix. But are...
4
Replies
396
Views
In studio 5000, is there a way to mass import tag values? I understand how to import the tag itself but can't find a way to mass import data to...
10
Replies
945
Views
Top