![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Mar 2023
Location: ON
Posts: 6
|
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. |
![]() |
![]() |
#2 |
Lifetime Supporting Member
|
If the SocketCreate service isn’t returning an instance, you should make sure the message path is set correctly.
Last edited by JeremyM; May 24th, 2023 at 02:44 PM. |
![]() |
![]() |
#3 |
Member
![]() ![]() Join Date: Mar 2023
Location: ON
Posts: 6
|
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. |
![]() |
![]() |
#4 |
Member
|
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 |
![]() |
![]() |
#5 |
Member
![]() ![]() Join Date: Mar 2023
Location: ON
Posts: 6
|
>>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. |
![]() |
![]() |
#6 |
Member
|
You need to use MOV to write a value returned by the MessageCreate to MessageRead.Instance or MessageWrite.Instance
|
![]() |
![]() |
#7 |
Member
![]() ![]() Join Date: Mar 2023
Location: ON
Posts: 6
|
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 |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TSX Premium MODBUS TCP Messaging | Gher.aphelion | LIVE PLC Questions And Answers | 1 | July 17th, 2007 09:42 PM |
A-B TCP Protocol Message Simulator for testing | Spectrum-Nashville | LIVE PLC Questions And Answers | 1 | July 6th, 2007 12:47 PM |
Flexlogix to micrologix message | micahg | LIVE PLC Questions And Answers | 12 | March 9th, 2007 05:58 PM |
Locale message display problem RSView Studio | mulderm | LIVE PLC Questions And Answers | 16 | November 13th, 2006 07:47 AM |
ENI - Inview message display configuration | Daggi | LIVE PLC Questions And Answers | 0 | April 21st, 2003 11:59 AM |