Jump to content

V570 e-mail sending (socket 3 connet does not work)


Recommended Posts

Hello everyone,

 

I’m trying to send an email via socket 3 and as long as exist connection between PC and PLC (online) LAN, everything works fine, but as soon as I disconnect PC and try to send, SB150 remains 0. Socket 3 not connected. I am making a mistake and would be appreciate if someone can help me with it. Pictures of Ladder are attached.

 

Thank you in advance

Initialization.png

Connect.png

e-mail send.png

send 2.png

send 3.png

Link to comment
Share on other sites

  • MVP 2023

You have several problems here. What is the purpose of MB 146? Do NOT do conditional subroutine calls. It is also very inadvisable to do conditional Socket initializations, especially here where it is completely unnecessary.

Please post your program here. We need to see inside your function blocks to provide any meaningful help.

Link to comment
Share on other sites

One possible problem is in first net where you SET and RESET MB 501. It would be fine this way, if you wont use this bit also in net. 

What happens behind the scenes is - Visilogic stores old value into temporary value  and uses it instead of freshly setted bit itself.  

Try splitting this net in two. 

Link to comment
Share on other sites

  • MVP 2023
On 8/8/2020 at 5:17 PM, Annatooli said:

Try splitting this net in two. 

NEVER place multiple logic threads into a single ladder rung. Separating the logic threads is what the ladder rungs are there for. Sometimes it will work, but without evaluating the compiled code or the STL, you can get unpredictable results.

Link to comment
Share on other sites

  • 4 weeks later...

Maybe I am too late here but nobody noticed risky using of rise edge of MB501 in Rung 1. When MB500 goes on, then MB501 is activated. This is the only case when second line of the Rung 1 is active. In situation when neither (SB146 = 1 and SB151 = 1 and SB146 = 1) nor (SB150 = 1) the MB501 never goes off so the TCP Connect Socket 3 is never called again until power cycle of PLC.

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.