You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old May 24th, 2023, 02:04 PM   #1
SOX111
Member
Canada

SOX111 is offline
 
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.
  Reply With Quote
Old May 24th, 2023, 02:37 PM   #2
JeremyM
Lifetime Supporting Member
United States

JeremyM is offline
 
JeremyM's Avatar
 
Join Date: May 2014
Location: Dallas, Texas
Posts: 1,051
If the SocketCreate service isn’t returning an instance, you should make sure the message path is set correctly.
__________________
LogixLibraries

Last edited by JeremyM; May 24th, 2023 at 02:44 PM.
  Reply With Quote
Old May 24th, 2023, 02:48 PM   #3
SOX111
Member
Canada

SOX111 is offline
 
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.
  Reply With Quote
Old May 25th, 2023, 07:23 AM   #4
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,467
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
  Reply With Quote
Old May 25th, 2023, 08:46 AM   #5
SOX111
Member
Canada

SOX111 is offline
 
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.
  Reply With Quote
Old May 25th, 2023, 09:21 AM   #6
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,467
You need to use MOV to write a value returned by the MessageCreate to MessageRead.Instance or MessageWrite.Instance
  Reply With Quote
Old May 25th, 2023, 01:59 PM   #7
SOX111
Member
Canada

SOX111 is offline
 
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
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
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


All times are GMT -4. The time now is 09:22 AM.


.