Jump to content

socket connect problem V570


Recommended Posts

can anybody help i am having a problem with the socket connect on a 570 i have initialised the tcp/ip card and initialised the socket.

I am connecting to a Lan router which has internet connection, i have set the subnet mask to 255.255.255.0,the ip is set to the ip of the router in the tcp/ip card init. What do i set the default gateway to???

The socket initialisation is set to the master with a port number of 20256 protocol tcp.

When i set the socket connect idont get a connection according to SB 147, i have set the socket connect with the ip of my outgoing mailserver and port 25.

Any help please!!!!!!

Cheers Andy

Link to comment
Share on other sites

Hi Andy,

You are going to want to set the IP in the CARD INT to unique and available IP. The first 3 octets are going to be the same as you PC/router but the last number needs to be unique.

If the IP for your computer for example was 192.5.5.40, you would need the CARD INT IP to start with "192.5.5.". In command prompt use can use "ping" to check if a particular IP is in use.

Hope that helps!

laugh.gif

can anybody help i am having a problem with the socket connect on a 570 i have initialised the tcp/ip card and initialised the socket.

I am connecting to a Lan router which has internet connection, i have set the subnet mask to 255.255.255.0,the ip is set to the ip of the router in the tcp/ip card init. What do i set the default gateway to???

The socket initialisation is set to the master with a port number of 20256 protocol tcp.

When i set the socket connect idont get a connection according to SB 147, i have set the socket connect with the ip of my outgoing mailserver and port 25.

Any help please!!!!!!

Cheers Andy

Link to comment
Share on other sites

can anybody help i am having a problem with the socket connect on a 570 i have initialised the tcp/ip card and initialised the socket.

I am connecting to a Lan router which has internet connection, i have set the subnet mask to 255.255.255.0,the ip is set to the ip of the router in the tcp/ip card init. What do i set the default gateway to???

The socket initialisation is set to the master with a port number of 20256 protocol tcp.

When i set the socket connect idont get a connection according to SB 147, i have set the socket connect with the ip of my outgoing mailserver and port 25.

Any help please!!!!!!

Cheers Andy

Hi Andy,

In addition to the great advice Ryan gives you hear it may also help to it might also help us to know more about what your application is.

Are you simply trying to send out emails? What kind of setting does you server support? You may want to look through the example programs first.

If you haven't already, you will also probably want to use the NAME function block to give you PLC a name.

Are you programming the PLC over a serial connection or the Ethernet connection.

I assume you are using Socket #2. You may want to setup on a socket other than 2 since Socket #2 has all the default config for easy connection via Visilogic.

The help file in Visilogic also does a great job of explaining the IP, Subnet, and Gateway. Judging by what your asking, it will be much to your benefit to spend the time reading through these before you dive in too deep.

Link to comment
Share on other sites

Thank-you Guys, i am running through socket 0, and i have got the plc to send emails but every now and then not all the time 1 in every twenty attempts.

I have checked the signal strength on my router which is -90dbm and i have an upload speed of 744kbps and down of 321kbps.

Im still not clear on how to allocate a particular socket to port 3, some advise on that would be great.

Thanks again!

Link to comment
Share on other sites

Im still not clear on how to allocate a particular socket to port 3, some advise on that would be great.

Are you talking about physcial port 3 (aka the ethernet port you installed) or "Well-Known" port 3. If it is the former, then that is no necessary. Your "software" sockects will all connection through the same physical hardware port. If you are talking about "Well-Known" port 3, I can't image why you would want to be using that.

Please clarify.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...