04-21-2008 04:35 AM
04-21-2008 04:47 AM
Hi Kabanga,
i see no problem with it, but why don´t you use a "wait until next ms multiple"? What do you want to do? You could also use an event structure to count your clicks.
Mike
04-21-2008 04:48 AM
I don't know why it work in edit mode, but not in exe.
If you place your bottom Switch-Case into the upper (in case TRUE), than it should send only once. I think.
04-21-2008 04:54 AM
Hi Kabanga,
here is an example with the event structure, so you don´t need the "wait until next ms multiple".
Mike
04-21-2008 05:14 AM
Hi Mike,
thanks for your help.
I just put the "OK" button for explanation purpuse. In fact the "ok" is done programatically each time I receive a defined byte from the serial port (please see the attached VI).
You helped me solve the problem related to byte reception and case-structure "driving" last week. I'm very sorry not having mentioned it to you know.
Is it possible in that case to use the event-structure?
Best regards
Kabanga
04-21-2008 05:47 AM
Hi Kabanga,
yes it is possible in this way. Is your serial receive function inside the while loop? When do you want to send the email? Why don´t you connect the reset for the counter?
Mike
04-21-2008 05:56 AM
Hi Kabanga,
now i see the problem. If the number is 12 it change first after you receive your signal again, so the mail will sent until the next event occurs. So one solution could be to reset your counter after sending the mail, or to increase it.
Mike
04-21-2008 06:52 AM
Thanks Mike, I'll use the solution you gave me and will late you know the outcome.
Best regards
Kabanga
04-21-2008 09:14 AM
Hi Mike,
after modifications my executable is still sending many emails as soon as it begins to run!
The edit mode is working very well. I cannot figure out what is going wrong.
Best regards
Kabanga
04-21-2008 09:17 AM
Hi Kabanga,
did you add the "wait until next ms multiple" or some other things to slow down you loop?
Mike