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

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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.