kevilay

Sysmac Studio Explicit Message Help

14 posts in this topic

Hello Guys,

I am using a nx102-9000 CPU and trying to communicate explicitly to a Telsonic Mag Generator. I have done this on a CJ2M & an Allen Bradley Processor successfully before but am struggling with sysmac. I will attach some screen shots of the AB message instruction because it is much more simple then the CJ2M (required pretty much a full function block made). If anyone wants to see the CJ2M block let me know. I am working right from the sysmac manual using the CIP OPEN, READ, SEND, & CLOSE. Once it is working I will write as well. 

I am getting stuck right on the first part "CIP OPEN" I am using a route of '02\10.203.21.40' I am unsure what the 02\ means. I am just copying it from the example. The IP Is correct. Below is the picture of my 1C05 Error. Which in the manual is confusing because they have a 1C error and an 05 error separately. 

Another question (once i can open a connection) is in the CIPRead the 'srcdat' I am not really sure what this is? Everything i've used before is an instance number, class, and attribute number (used in the CIPSend

Logic From Allen Bradley MSG Instruction & Current Sysmac logic shown in pictures as well.

Please let me know if you have any suggestions or need any additional information.


Thanks,

Kevin

OmronLogic.png

error2.png

error.png

AB Logic.png

Share this post


Link to post
Share on other sites

THESE ARE WILD GUESSES

1) 02 is the Port Identifier telling the open command what slot or port us using ethernent.  Might try a 0 or 1 and see if things change.

2) 02 is the Protocol Identifier telling the open command to use Ethernet, EthereCat, Serial, etc.  Might Try 0 or 1 and see if things change.

A thorough reading the manual will likely prove something like the above to be the case.

Share this post


Link to post
Share on other sites
1 hour ago, BobLfoot said:

THESE ARE WILD GUESSES

1) 02 is the Port Identifier telling the open command what slot or port us using ethernent.  Might try a 0 or 1 and see if things change.

2) 02 is the Protocol Identifier telling the open command to use Ethernet, EthereCat, Serial, etc.  Might Try 0 or 1 and see if things change.

A thorough reading the manual will likely prove something like the above to be the case.

So I did find it in a different manual after doing some searching 02 is the correct choice. It is depending on what ethernet port you are using and if it the CPU port or a different card on the rack. However I am still not having luck! 

Share this post


Link to post
Share on other sites

I'm assuming you found the RoutePath information here and you are using Port 1 on the NX102.

Mr_PLC_RoutPath.thumb.JPG.443f7a3fe72f9a

I'm not sure why you are getting the error. Have you tried using the CIPUCMMSend instead? This is more like the AB message instruction. It's nearly the same as your example except you are not required to Open and you specify the service code in this instruction.

Share this post


Link to post
Share on other sites
40 minutes ago, IO_Rack said:

I'm assuming you found the RoutePath information here and you are using Port 1 on the NX102.

Mr_PLC_RoutPath.thumb.JPG.443f7a3fe72f9a

I'm not sure why you are getting the error. Have you tried using the CIPUCMMSend instead? This is more like the AB message instruction. It's nearly the same as your example except you are not required to Open and you specify the service code in this instruction.

2 hours ago, BobLfoot said:

THESE ARE WILD GUESSES

1) 02 is the Port Identifier telling the open command what slot or port us using ethernent.  Might try a 0 or 1 and see if things change.

2) 02 is the Protocol Identifier telling the open command to use Ethernet, EthereCat, Serial, etc.  Might Try 0 or 1 and see if things change.

A thorough reading the manual will likely prove something like the above to be the case.

So I did find it in a different manual after doing some searching 02 is the correct choice. It is depending on what ethernet port you are using and if it the CPU port or a different card on the rack. However I am still not having luck! 

 

I am going to try the CIPUCMMSend instruction now. I thought originally this was just for PLC to PLC comms.

Share this post


Link to post
Share on other sites

Thanks for that suggestion with the CIPUCMMSend I was able to successfully read in the data. It is reading in 44 bytes (22 uints) the data lines up properly with my generator manual and the physical data read in matched in the MAG software. However when I am populating my servicedat and len to do a write (its a read write parameter) I get an error #0419. I did find an error manual online and that is an incorrect data type error. But you can see in my picture I have two identical arrays I just moved what I read in to the service dat and attempted to send it. We are so close! Any suggestions 

 

 

progress.png

1 person likes this

Share this post


Link to post
Share on other sites

Size is bytes yes, Try an array specifier - [0] for example.

Share this post


Link to post
Share on other sites

Dear Friend.

we can try on NX1P2 with Compact L32E Rockwell cpu?

Please advise if it can be do.

Many thanks,

Share this post


Link to post
Share on other sites
14 hours ago, kevilay said:

Thanks for that suggestion with the CIPUCMMSend I was able to successfully read in the data. It is reading in 44 bytes (22 uints) the data lines up properly with my generator manual and the physical data read in matched in the MAG software. However when I am populating my servicedat and len to do a write (its a read write parameter) I get an error #0419. I did find an error manual online and that is an incorrect data type error. But you can see in my picture I have two identical arrays I just moved what I read in to the service dat and attempted to send it. We are so close! Any suggestions 

 

 

progress.png

are you sure the serive code is #16#0E ? and not #16#10 ?

#0E is generally get single attribute and #10 set single attribute. 

Share this post


Link to post
Share on other sites
1 hour ago, chelton said:

are you sure the serive code is #16#0E ? and not #16#10 ?

#0E is generally get single attribute and #10 set single attribute. 

Thanks for that suggestion with the CIPUCMMSend I was able to successfully read in the data. It is reading in 44 bytes (22 uints) the data lines up properly with my generator manual and the physical data read in matched in the MAG software. However when I am populating my servicedat and len to do a write (its a read write parameter) I get an error #0419. I did find an error manual online and that is an incorrect data type error. But you can see in my picture I have two identical arrays I just moved what I read in to the service dat and attempted to send it. We are so close! Any suggestions 

 

Good catch. So I was using the wrong service code when trying to set the attribute. I have corrected that but still getting a 0419 datatype error. I did also try changing it from 22 uints to 44 bytes for the result data and the send data. Then send 44 elements. Both ways I am still getting the same error. But everything reads in correctly. So strange

Share this post


Link to post
Share on other sites

Did you try specifying an array position on the outgoing data?

Share this post


Link to post
Share on other sites

From the manual for the CIPUCMMSend instruction:

Size specifies the number of elements to send.

If ServiceDat is an array, specify the number of elements to send.

If ServiceDat is not an array, always specify 1.

If no service data is required, set Size to 0.

The response data received later is stored in RespServiceDat. The number of bytes of the response data is stored in RespSize.

1 person likes this

Share this post


Link to post
Share on other sites
6 hours ago, photovoltaic said:

Did you try specifying an array position on the outgoing data?

9 hours ago, chelton said:

are you sure the serive code is #16#0E ? and not #16#10 ?

#0E is generally get single attribute and #10 set single attribute. 

So the issue was with specifying the array position. In the example it called an variable that was an array but in the block it called the variable without an array specifier. This is inncorect it needed to be variable[0]. I never tried this because their example was not done this way. For some reason on the read it will work with or without the [0] however on the write it is critical to have the [0]. Thank you everyone for your help. Consider this issue closed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now