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

SOX111

Member
Join Date
Mar 2023
Location
ON
Posts
8
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.
 
If the SocketCreate service isn’t returning an instance, you should make sure the message path is set correctly.
 
Last edited:
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.
 
You need to use MOV to write a value returned by the MessageCreate to MessageRead.Instance or MessageWrite.Instance
 
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

Hi Hope you all are doing well. Iam working on a project with some AOI. I also hate no online edits... lol. My problem occurs when I use a UDT...
Replies
0
Views
21
I am not sure if this is possible but if there is a way, you guys would be the ones to know. I am currently working on a project where we are...
Replies
7
Views
184
Hi all. I'm having issues adding an ethernet module to my project in Studio500 v34. The device is a Fredericks Televac EthernetIP MX gateway which...
Replies
8
Views
258
The day of week program started changing day of week 2 hours early. It changes at 10 P.M. instead of 12A.M. Just started this year.
Replies
22
Views
2,569
Hello All, need one help , looking for a example which can help me to write following code in Studio 5000 ladder logic. I have 2 String...
Replies
14
Views
735
Back
Top Bottom