cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-347663%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EAspetta(0)%20vs%20Aspetta(n)%20vs%20Esegui%20vs%20Fine%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-347663%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHo%20tabelle%20di%20dati%20molto%20grandi%20e%20in%20costante%20crescita%2C%20quindi%20ho%20problemi%20con%20le%20formule%20che%20non%20finiscono.%20Vorrei%20che%20JMP%20integrasse%20semplicemente%20un%20meccanismo%20per%20impedire%20agli%20script%20di%20continuare%20fino%20al%20termine%20di%20ogni%20riga%2C%20ma%20forse%20c'%C3%A8%20un%20motivo%20per%20non%20farlo%20a%20cui%20non%20sto%20pensando.%20In%20genere%20utilizzo%20un%20comando%20wait(n)%20(ad%20esempio%20wait(30)%3B)%20tuttavia%20man%20mano%20che%20il%20set%20di%20dati%20cresce%20devo%20costantemente%20aggiornare%20innumerevoli%20istanze%20di%20%22wait%22%20tra%20le%20migliaia%20di%20righe%20di%20codice%20poich%C3%A9%20le%20tabelle%20diventano%20troppo%20grandi%20per%20alcuni%20righe%20di%20codice%20per%20completare%20la%20valutazione.%20In%20seguito%20ho%20pensato%20di%20averlo%20imparato%20wait(0)%3B%20sarebbe%20dinamico.%20Aspetterebbe%20tutto%20il%20tempo%20necessario%20per%20completare%20la%20valutazione%20prima%20di%20passare%20alla%20riga%20successiva%2C%20quindi%20ho%20cambiato%20tutto%20in%20wait(0)%2C%20ma%20ora%20molte%20righe%20non%20vengono%20completate%20e%20quindi%20lo%20script%20si%20interrompe.%20Ho%20sbagliato%20a%20pensare%20che%20l'attesa(0)%3B%20il%20comando%20sarebbe%20dinamico%20come%20ho%20descritto%3F%20Ho%20provato%20i%20comandi%20%22Esegui%22%20e%20%22Fine%22%20ma%20nessuno%20dei%20due%20ha%20funzionato.%20Sono%20tornato%20indietro%20e%20ho%20inserito%2C%20ad%20esempio%2C%20wait(30)%3B%20in%20un%20posto%20e%20ha%20funzionato%20di%20nuovo..%20quindi%20sono%20bloccato%20con%20questi%20incrementi%20di%20tempo%20statici%20che%20dovr%C3%B2%20inevitabilmente%20continuare%20a%20cambiare%20nel%20tempo..%20o%20sto%20facendo%20qualcosa%20di%20sbagliato%20qui%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-347663%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAutomazione%20e%20scripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-347958%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Aspetta%20(0)%20vs%20Aspetta%20(n)%20vs%20Esegui%20vs%20Fine%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-347958%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPenso%20che%20se%20hai%20delle%20formule%20nelle%20tabelle%20che%20stai%20unendo%2Faggiornando%2C%20potrebbe%20essere%20d'aiuto.%20Penso%20di%20non%20aver%20mai%20avuto%20problemi%20con%20le%20tabelle%20dati%20direttamente%20correlate%20a%20JMP%20che%20mi%20avrebbero%20richiesto%20di%20utilizzare%20l'attesa%20(la%20maggior%20parte%20dei%20problemi%20erano%20legati%20ad%20alcune%20variabili%20che%20non%20ottenevano%20valori%20o%20con%20visualizzazioni%20in%20una%20nuova%20finestra).%20Non%20conosco%20abbastanza%20dettagli%20tecnici%20su%20cosa%20sta%20facendo%20JMP%20in%20background%2C%20quindi%20potresti%20provare%20a%20inviare%20un'e-mail%20%3CA%20href%3D%22mailto%3Asupport%40jmp.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ea%20support%40jmp.com%3C%2FA%3E%20per%20ricevere%20assistenza%3F%20Taggando%20anche%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6878%22%20target%3D%22_blank%22%3E%40Jeff_Perkinson%3C%2FA%3E%20in%20base%20a%20questa%20vecchia%20risposta%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-can-I-force-my-script-to-execute-sequentially%2Fm-p%2F18437%23U18437%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-forum-thread%20lia-fa-icon%20lia-fa-forum%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3ECome%20posso%20forzare%20l'esecuzione%20del%20mio%20script%20in%20sequenza%3F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EUn%20paio%20di%20domande%3A%3C%2FP%3E%0A%3CP%3EStai%20utilizzando%20Current%20Datatable()%20per%20fare%20riferimento%20ai%20datatable%3F%20Quale%20versione%20di%20JMP%20stai%20utilizzando%3F%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3ECollegamenti%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F15.2%2Findex.shtml%23page%2Fjmp%2Fscripting-data-tables.shtml%23ww2071832%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F15.2%2Findex.shtml%23page%2Fjmp%2Fscripting-data-tables.shtml%23ww2071832%3C%2FA%3E%20%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F15.2%2Findex.shtml%23page%2Fjmp%2Fscripting-numbers-strings-arrays-and-lists.shtml%23%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F15.2%2Findex.shtml%23page%2Fjmp%2Fscripting-numbers-strings-arrays-and-lists.shtml%23%3C%2FA%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-347708%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Aspetta%20(0)%20vs%20Aspetta%20(n)%20vs%20Esegui%20vs%20Fine%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-347708%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAvrei%20dovuto%20specificare%20che%20non%20si%20tratta%20solo%20di%20valutazioni%20di%20formule%20ma%20di%20azioni%20come%20l'apertura%2C%20l'unione%20o%20l'aggiornamento%20di%20un'altra%20tabella%2C%20l'ordinamento%20di%20una%20tabella%2C%20ecc.%20Questi%20comandi%20funzioneranno%20su%20cose%20che%20non%20sono%20formule%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-347684%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Aspetta%20(0)%20vs%20Aspetta%20(n)%20vs%20Esegui%20vs%20Fine%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-347684%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHai%20provato%20a%20utilizzare%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%26lt%3B%26lt%3B%20Run%20Formulas()%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EO%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%26lt%3B%26lt%3B%20Rerun%20Formulas%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Eper%20quanto%20ne%20so%2C%20JMP%20dovrebbe%20attendere%20il%20completamento%20della%20valutazione%20della%20formula%20prima%20di%20continuare.%3C%2FP%3E%3CP%3EAltre%20opzioni%20possibili%3A%20Sono%20necessarie%20anche%20le%20formule%3F%20Potresti%20farcela%20con%20%3CEM%3E%26lt%3B%26lt%3B%20Imposta%20ciascun%20valore%3C%2FEM%3E%20anzich%C3%A9%20le%20formule%3F%20Potrebbe%20anche%20essere%20usato%20%3CEM%3Edt%20%26lt%3B%26lt%3B%20Begin%20Data%20Update%3C%2FEM%3E%20%3B%20e%20%3CEM%3Edt%20%26lt%3B%3CFINE%20aggiornamento%3D%22%22%20dati%3D%22%22%3E%3C%2FFINE%3E%3C%2FEM%3E%20%3B%20potrebbe%20essere%20utile.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810257%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Attendi(0)%20vs%20Attendi(n)%20vs%20Esegui%20vs%20Finisci%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810257%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIn%20generale%2C%20ho%20utilizzato%20le%20formule%20%26lt%3B%3CRUN%20nei%3D%22%22%20miei%3D%22%22%20script.%3D%22%22%3E%3C%2FRUN%3E%3C%2FP%3E%3CP%3EMa%20sono%20d'accordo%20con%20quanto%20scritto%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F3947%22%20target%3D%22_blank%22%3Eda%20%40RVhydrA%3C%2FA%3E%20.%3CBR%20%2F%3E%20Da%20quanto%20scritto%20nell'indice%20di%20scripting%2C%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Ewait(0)%3C%2FFONT%3E%20dovrebbe%20svolgere%20lo%20stesso%20lavoro%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1731304755634.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731304755634.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731304755634.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70018iCAA9EE5B405BD235%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1731304755634.png%22%20alt%3D%22hogi_0-1731304755634.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810275%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Attendi(0)%20vs%20Attendi(n)%20vs%20Esegui%20vs%20Finisci%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810275%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CUL%3E%0A%3CLI%3EUtilizzare%20wait(0)%20per%20far%20apparire%20le%20finestre%20e%20far%20funzionare%20i%20pulsanti%20durante%20un%20ciclo.%3C%2FLI%3E%0A%3CLI%3EUtilizzare%20%26lt%3B%20%3CRUNFORMULAS%20for%3D%22%22%20forcing%3D%22%22%20evaluation%3D%22%22%20of%3D%22%22%20data%3D%22https%3A%2F%2Fcommunity.jmp.com%2F%22%20table%3D%22%22%20formulas%3D%22%22%20to%3D%22%22%20complete.%3D%22%22%3E%26lt%3B%20i%26gt%3B%3C%2FRUNFORMULAS%3E%3C%2FLI%3E%3CLI%3EUtilizzare%20wait(1)%20per%20rallentare%20l'esecuzione%20di%20uno%20script%2C%20ad%20esempio%20per%20visualizzare%20una%20progressione%20di%20modifiche.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ELe%20formule%20di%20tabella%20di%20JMP%20vengono%20valutate%20in%20background%2C%20quando%20JMP%20%C3%A8%20inattivo.%20Wait(%20n%20%26gt%3B%200%20)%20fa%20s%C3%AC%20che%20JMP%20sia%20inattivo%20in%20modo%20che%20le%20formule%20possano%20essere%20valutate.%20La%20valutazione%20della%20formula%20del%20tempo%20di%20inattivit%C3%A0%20%C3%A8%20piuttosto%20lenta%3B%20usando%20dt%26lt%3B%20%3CRUNFORMULAS%20will%3D%22%22%20be%3D%22%22%20dramatically%3D%22%22%20faster%3D%22%22%20if%3D%22%22%20there%3D%22%22%20are%3D%22%22%201e6%3D%22%22%20rows%3D%22%22%20in%3D%22%22%20the%3D%22%22%20table.%3D%22%22%3E%26lt%3B%26gt%3B%3C%2FRUNFORMULAS%3E%3C%2FP%3E%3CP%3EMolti%20comandi%20della%20tabella%20dati%20hanno%20il%20carattere%20%26lt%3B%20%3CRUNFORMULAS%20built%3D%22%22%20in%3D%22%22%3E%3C%2FRUNFORMULAS%3E%3C%2FP%3E%3CP%3EIl%20tempo%20di%20inattivit%C3%A0%20Wait(n)%20consente%20al%20sistema%20operativo%20di%20aggiornare%20il%20display%20e%20inviare%20sequenze%20di%20tasti%20e%20clic%20del%20mouse%20al%20programma.%20Se%20si%20scrive%20un%20ciclo%20senza%20wait(0)%20tempo%20di%20inattivit%C3%A0%20che%20apre%20e%20chiude%20le%20piattaforme%2C%20non%20si%20vedr%C3%A0%20alcuna%20attivit%C3%A0%20sul%20display.%20Se%20si%20ha%20bisogno%20di%20vedere%20le%20finestre%20aprirsi%2C%20wait(0)%20%C3%A8%20appropriato.%20C'%C3%A8%20anche%20una%20piccola%20penalit%C3%A0%20di%20tempo%20per%20wait(0)%2C%20anche%20se%20non%20succede%20nulla.%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
RVhydrA
Level III

Wait(0) vs Wait(n) vs Run vs Finish

I have very large, and constantly growing data tables so I have issues with formulas not finishing. I wish JMP would just build in a mechanism to stop scripts from continuing until each line has finished but perhaps there is a reason for not doing this I'm not thinking of. I typically use a wait(n) command (e.g. wait(30);) however as the dataset grows I'm constantly having to update countless instances of "wait" throughout the thousands of lines of code as the tables become to large for certain lines of code to finish evaluating. I later thought I had learned that wait(0); would be dynamic. It would wait as long as is needed to finish the evaluation before moving to the next line, so I changed everything to wait(0), but now many lines are failing to complete and thus the script is breaking. Was I wrong to think that the wait(0); command would be dynamic as I described? I tried "Run" and "Finish" commands but neither worked. I went back and put, for example, a wait(30); in one place and it worked again.. so am I stuck with these static time increments that I'll inevitably have to continue changing over time.. or am I doing something wrong here?

5 REPLIES 5
jthi
Super User

Re: Wait(0) vs Wait(n) vs Run vs Finish

Have you tried using:

dt << Run Formulas();

or

dt << Rerun Formulas;

to my understanding with these JMP should wait for formula evaluation to finish before it continues.

Other possible options: Also are formulas necessary? Could you manage with << Set Each Value instead of Formulas? Also maybe use of dt << Begin Data Update; and dt << End Data Update;  could be of use.

 

-Jarmo
RVhydrA
Level III

Re: Wait(0) vs Wait(n) vs Run vs Finish

I shouldn have specified that its not only formula evaluations but actions like opening and joining or updating another table, sorting a table, etc.. will those commands work on things that aren't formulas?

jthi
Super User

Re: Wait(0) vs Wait(n) vs Run vs Finish

I think if you have formulas in the tables you are joining/updating then it could help. I think I have never had issues with directly related to JMP data tables which would have required me to use wait (mostly issues have been related to some variables not getting values or with visualisations in new window). I don't know enough technical details what JMP is doing in background so maybe you could try emailing support@jmp.com for assistance? Also tagging @Jeff_Perkinson based on this old response How can I force my script to execute sequentially? 

 

Couple of questions:

Are you using Current Datatable() to reference to datatables? Which JMP version are you using?

 

Links:

https://www.jmp.com/support/help/en/15.2/index.shtml#page/jmp/scripting-data-tables.shtml#ww2071832 

https://www.jmp.com/support/help/en/15.2/index.shtml#page/jmp/scripting-numbers-strings-arrays-and-l... 

-Jarmo
hogi
Level XII

Re: Wait(0) vs Wait(n) vs Run vs Finish

In General, I used << run formulas in my scripts.

But, I agree to what @RVhydrA wrote.
From what is written in the scripting index, wait(0) should do the same job:

hogi_0-1731304755634.png

 

 

Craige_Hales
Super User

Re: Wait(0) vs Wait(n) vs Run vs Finish

  • Use wait(0) to make windows appear and make buttons work during a loop.
  • Use <<RunFormulas for forcing evaluation of data table formulas to complete.
  • Use wait(1) to make a script run slower, perhaps to visualize a progression of changes.

JMP's table formulas evaluate in the background, when JMP is idle. Wait( n > 0 ) makes JMP be idle so the formulas can evaluate. The idle time formula evaluation is quite slow; using dt<<RunFormulas will be dramatically faster if there are 1E6 rows in the table.

Many data table commands have the <<RunFormulas built in ( dt<<sort, for example.) But operations like row indexing ( dt:height[i], for example ) do not, and an explicit <<RunFormulas is recommended (before the loop, not in the loop...there is a small time penalty even if it does nothing.)

Wait(n) idle time allows the operating system to update the display and send keystrokes and mouse clicks to your program. If you write a loop with no wait(0) idle time that opens and closes platforms, you won't see any activity on the display. If you need to see the windows popping open, a wait(0) is appropriate there. There is a small time penalty for wait(0) as well, even if nothing happens.

 

Craige