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

Hey All, I have a question that i have been bugging me for about a year now. I think it is time i tackle this problem head on and try to produce a...
Replies
15
Views
517
Hey All, I am working on my home automation project running on an Compactlogix 1769 L35E. I have a calculation that looks like this: This...
Replies
29
Views
817
Hello all, Hope you all are having a good weekend. Can someone share me an opinion to which software should i get. We have around 5-6...
Replies
4
Views
196
I have an array of 55 REAL values. Is there a way to multiply based on the array location ? I have 55 transfer belts that are equally spaced...
Replies
3
Views
206
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
2
Views
211
Back
Top Bottom