Jump to content

Stopping the system


Recommended Posts

QUOTE (chocobar @ Nov 12 2008, 06:32 AM)

I need help over here...the problem that lies with my VI is that when i run it, it will continue on sending out sms to the phone number repeatedly...my problem now is that i need to make the VI to send out only once when its being triggered...anyone have a solution???

Maybe I am going mad, I cannot see any reason that this VI would be repeatedly sending a message, unless you were calling it repeated from above, you are pressing the Run button and not the Run Continuously button (just asking).

The layout could be better, the need for the outer case I cannot figure out, and there is a lot of hidden wire under the outer case statement between the tunnel and the SMS string indicator

hope this is some help

Dannyt

Link to comment

QUOTE (chocobar @ Nov 11 2008, 10:32 PM)

I need help over here...the problem that lies with my VI is that when i run it, it will continue on sending out sms to the phone number repeatedly...my problem now is that i need to make the VI to send out only once when its being triggered...anyone have a solution???

I vote with Danny on this one. You must be calling the VI more than once.

Link to comment

QUOTE (chocobar @ Nov 18 2008, 04:50 AM)

my target is to run this thing continously and when it triggers...the sms system will be activated and thus send out 1 email to respective numbers

Can you clarify run this thing continuously? What do you mean by that? Are you starting the VI with the Run Continuously button? Post the code of how/where you are calling the VI that you posted previously and I think we'll be able to help you.

-Toby

Link to comment

QUOTE (TobyD @ Nov 18 2008, 11:52 AM)

Are you starting the VI with the Run Continuously button?

That's the first thing I thought of when I read through this. It's a reasonable enough mistake ... if you've never used LabVIEW before :> I think what he's really looking for is a finite state machine.

Link to comment

QUOTE (TobyD @ Nov 18 2008, 04:52 PM)

Can you clarify run this thing continuously? What do you mean by that? Are you starting the VI with the Run Continuously button? Post the code of how/where you are calling the VI that you posted previously and I think we'll be able to help you.

-Toby

im trying to say that my VI will be running 24hrs...and yes i started the VI with the Run Continuously button...

Link to comment

QUOTE (TobyD @ Nov 19 2008, 03:18 PM)

the vi that i post is an example for a given condition...i did try to put a while loop but still it will continue on sending message...

im gonna use USB DAQ to acquire a signal from the thermistor and from there it will trigger the vi...i tried and when it stays on a certain temperature...it will continue to keep on sending sms...

like for example i set the trigger condition to be activated at 37...

when 37 is being displayed throughout...it will keep on sending out sms...

my problem now is to make sure that when it remain constant...it wont send multiple messages...i want it to be send out once...

if you guys want me to post what i did i can upload it here...

Link to comment

QUOTE (chocobar @ Nov 24 2008, 07:00 AM)

the vi that i post is an example for a given condition...i did try to put a while loop but still it will continue on sending message...

im gonna use USB DAQ to acquire a signal from the thermistor and from there it will trigger the vi...i tried and when it stays on a certain temperature...it will continue to keep on sending sms...

like for example i set the trigger condition to be activated at 37...

when 37 is being displayed throughout...it will keep on sending out sms...

my problem now is to make sure that when it remain constant...it wont send multiple messages...i want it to be send out once...

if you guys want me to post what i did i can upload it here...

I see your problem. What I would do is use a feedback node or shift register initialized to a FALSE boolean. Once you hit the trigger case where the SMS is sent, set that boolean to TRUE and then add conditional code that won't send the SMS if that boolean is true. In the opposing case that is executed whenever the trigger condition isn't met, set the boolean to false.

You could go really overboard and use timestamps to track when the last SMS was sent and if it was within x minutes, skip this trigger.

Link to comment

QUOTE (BrokenArrow @ Nov 25 2008, 07:29 AM)

I apologize for this being tangential, however: why use the Open Visa before the Setup?

My point here was just to demonstrate the while loop. I kept his original code unchanged (other than running the diagram cleanup tool on it). That said, the VISA driver used to require a VISA Open at the beginning of a program. It was later changed so that the driver would automatically open a VISA reference if it needs one. So, it is not even necessary to have it in there at all - although it is probably still a good practice from a readability point of view.

Link to comment

QUOTE (TobyD @ Nov 25 2008, 11:14 AM)

My point here was just to demonstrate the while loop. I kept his original code unchanged (other than running the diagram cleanup tool on it). That said, the VISA driver used to require a VISA Open at the beginning of a program. It was later changed so that the driver would automatically open a VISA reference if it needs one. So, it is not even necessary to have it in there at all - although it is probably still a good practice from a readability point of view.

10-4 thanks Toby. And I knew it wasn't your code snippet. I replied to your post simply because it contained the picture. :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

Important Information

By using this site, you agree to our Terms of Use.