Jump to content

Vision 350 Send TCP message


Recommended Posts

Hi.

I have a Vision 350 with ethernet module. I am connecting to the PLC via a remote device (Sitemanager from Secomea). This device can listen for messages on specific TCP/UDP port. The default port is 26864 for both. It can then trigger alarms and send SMS or email messages to the recipient. To do it, I need to send a message in the format: /UserName/PassWord/MobilNumber/AlertText. Username and password is optional. A typical message could be example: /+4511223344/Message text 1 to be send.

So, my question is, can I use any of the TCP/IP functions in the 350 to send a message string like this to a specific port?

Link to comment
Share on other sites

I've now used the FB Protocol. I followed the guide in the instructions. I've initialized the ethernet card and the socket 0 during powerup, and also the protocol. Socket 0 is initialized as TCP and to port 26864 (This is the default listening port on the Sitemanager).

Whenever there is an alarm that should trigger an alert message, I use the connect socket 0 FB and then the Send TCP FB.

In the Sitemanager logfile, I can read that it has received a message request from the Visio, but that the request times out because the request is incomplete. I am guessing that the message format from the  Visio might not be correct? I am not sure how to be able to do this. Does the message have to be send on specific socket or port from the Visio perhaps? 

 

Edit: I made it work. It had to do with the timing of sending the message. I was trying to send the message before the socket was properly connected. If I used the SB for "socket connected" as a trigger for sending the message, it worked.

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...