PLC coding question

if it does work and as long as RAM1 is greater then 500 it will keep sending email for ever.
Do you want it to reset if it goes below 500?
 
try this
RAM3 for email send only 1 time
 
start
    set ram1 0
    set ram2 1
    set ram3 0 
    set var1 0
loop:
    add t2 ram2 ram1
    tstgt ram1 500
    calsub send_em1
    goto loop
  end
 
 
send_em1: 
   
    tsteq ram3 0
    email em1
    set ram3 1
    set var1 99
    ret
 
START     
SET VAR1 99 
TSTGT VAR1 50 
EMAIL EM1   
END  
 
It worked for me but like i said it will not stop emailing(to many emails at one time and yahoo and outers will think it is spam and suspend service for 24hr)
 
is your email working? after saving try test
 
If you can use browser login to the board, email should work and board should be fine.  It most likely is the email configuration in the notification screen.
After you configured EMs in the NOTIFICATION screen, did you try to send test emails?  If test emails not sending, please try to check your email and network configuration.
 
On the notification screen, we showed examples how to send email through Yahoo server. If your own email server having sending problem, please try to use Yahoo email server first.  Please use your own Yahoo account information, not our example information, since we did not show the real Yahoo user ID and password on the example.
 
Sorry you feel that way. From emails back and forth, we identified the board is a perfect working board. We also offered you if you send it back, we will send you a new board as replacement. 
 
x10 said:
I have a bad board. CAI support does not offer to replace it. Poor customer service. Buyers beware!
 
From what I've seen above, it sounds like you have a perfectly working board that you have failed to configure properly.
Blaming "poor customer service" for "inadequate user ability" is poor form.
 
From his email communication, we learnt that he was running setvar.cgi to VAR1 from a computer, at the mean time, he was trying to set VAR1 to another value in PLC.  He insisted that the board is defective, because VAR1's value is not being set by PLC.  We asked him to try another VAR, since he is running setvar.cgi on VAR1.  He also claimed EM testing was working, but PLC failed send out email based on the example posted here referred to VAR1, he believed that was email  hardware failure. We are sorry we could not help him to work, since VAR is a variable in RAM, if two processes trying to set it at the same time to different values, it will not work properly.  But we really want him to use the board, once he figures out, I am sure he will like it.  This forum provided a good learning environment for everyone to post question and concern, so that we can all learn.
 
x10 said:
I have ordered another board. I'll give you my results next week when I receive it.
 
Another board won't fix or change the underlying problem.
If you have multiple things trying to set a variable to conflicting values, one of them will always be wrong. That's not a problem with the board.
 
Similarly, if the test email sends, but the email isn't sending within your code, the chances are that the problem lies in your code, not the board!
I have multichannel temperature loggers in the field that have been running for several years, sending emails every 30 seconds that have never stopped.
The product works fine. I've got probably close to 50 of these boards in service in different places where people rely on them. I wouldn't if they were flaky!
 
Back
Top