Jump to content
Private Messaging is activated - check "How to" on how to disable it ×

wait() without having to wait


---
 Share

Recommended Posts

I realize I may be asking a lot here...

Occasionally, to delay the continuation of a program, I use the wait() command. I'm not actually using PCM, but I can stick it into, for example, a comment. Unfortunately, when I do that, if for example, I want to wait 120 seconds, then after I enter that formula, I have to wait 2 minutes for calypso to close the formula dialog, and then another 2 minutes before it will let me close the feature or rename dialog box. If I want to put in longer delays, it gets even more painful. You get the picture.

Is there any way to do this so that the wait() only takes effect when the program is running?
Link to comment
Share on other sites

Well i'm pretty sure there is no official way since PCM in a dialog or form always runs even when programming as you have seen.

However.. if you were to save your program and make a copy of the inspection file (its just text), then add a wait command of 1 second and save the program again, then comparet he two text fiels.. you could probably find sometyhing interesting.
Link to comment
Share on other sites

  • 4 months later...
You can put a variable at the beginning of the program and is this value is true the wait() command is executed.

In Beginning of program, put
executedCode = true
In the characteristic, put :
if executedCode then wait(120)
It is just an idea 😉

Nico.
Link to comment
Share on other sites

I guess when they copied this thread forward from the old forum, they didn't bother identifying the people involved. I was the OP of this thread (if memory serves). I like the idea, but without PCM it can't be implemented.
Link to comment
Share on other sites

It's a bit of a hack, but you could use a dummy feature to store your variable in the nominals. For instance, create a point named "waitTime" and set the nominal X value to 0. Then put
wait(getNominal("waitTime").x)
in your formulas where some lag time is needed. Change the waitTime point's nominal X to 120, or whatever, when you're ready to run the program.

Ctrl-Y might be more effective in this particular case, but this trick is handy from time to time when you need to store a value as a variable without a full PCM license.
Link to comment
Share on other sites

 Share

×
×
  • Create New...