NgoHoang

NX1P2 SktTCPConnect

4 posts in this topic

Dear

I'm studying PLC Omron NX1P2 series. I'm facing an issue with "_sSOCKET_ADDRESS" data type in SktTCPConnect function block.

Could you tell me how to define the value for this datatype in SysmacStudio? which is format for "_sSOCKET_ADDRESS" data type

Ex: I want to declare DestAddress is 192.168.1.123

 

Capture.PNG

Share this post


Link to post
Share on other sites

_sSOCKET_ADDRESS is a pre-defined Structure in Sysmac Studio. Here are the elements of the structure:

Mr_PLC_SocketAddress.thumb.JPG.e1de6c149

There is syntax to populate the Initial Value field but I find it easier to do it in PLC code.

Mr_PLC_SocketAddressCode.JPG.7c8dc4b455d

Share this post


Link to post
Share on other sites

If you click in the Initial Values column, a black box appears, and when you click it, you will see each member of the structure and can enter data that way too, if it doesn't need to be changed.

Also keep in mind the IP address is a string, so it needs to be in single quotes '192.168.250.10'

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