How to pause a program?
I am running java program in dos mode.
Actually I want to pause the program when the program is running. How should I do that? Is there any keystroke?
How to resume, if we pause the program?
Thanks
I'm pretty sure that only pauses the output. If you have a thread that does something while the user I/O is blocked, it'll keep going.
But maybe that's what you want. Or maybe it's irrelevant. Who knows?
Similar Messages
-
How to pause program execution?
I'm developing a board game. It has the Board class, Coin class and Dice class.
The dice class has an animation to show the dice rolling. The coin class also has an animation to show the coin moving from start square to end square.
When user clicks on the dice the sequence of steps that take place are -
getRandomNumber();
dice.roll();
coin.move();
But the problem I'm facing is even before the dice rolling animation stops, the coin moving animation begins.
How can I pause the program execution so I can move to next line in program only when the animation in the previous is stopped?
or How can I change the logic so that it goes as desired.Timelines (well, actually KeyFrames) have an action variable, where you can put a function doing whatever you need to do at the end of the key frame.
So, you can make your coin to move at the end of the dice animation (ie. calling coinAnimation.play() in the action of the last key frame of diceAnimation). -
Automatic Pause (through program) and Manual Resume through front panel Button
Hi, I am trying to implement a system which measures voltage and current for a varying source voltage at varying temperature. The program acquires 5 pairs of voltage and current data. The issue here is that the source voltage is varied by manually changing the value of the variable resistor. What I would like to do is somehow pause the program automatically once the loop (for acquiring 5 V and I data pairs) has completed. Then, after the user manually changes the value of the variable resistor (and enters the new value through a front panel indicator), the user should be able to resume the program through a front panel button like in this example: https://decibel.ni.com/content/docs/DOC-10792
Is it possible to implement this in LabView?
In summary: I would like to implement a system in which the program would pause automatically after a condition has been fulfilled, and can be resumed through a front panel button.
Thank you in advance for any help and suggestions. I hope I made my query clear. I'm not sure whether attaching the program would help but I included it just in case
Solved!
Go to Solution.
Attachments:
Resistivity Measurement.vi 132 KBHi all! I've overhauled my program after learning how to create state machines in LabVIEW. I think I've managed to make it able to pause program execution by staying in the Initialize state if Pause After Measurement is set to True, only resuming measurement once the user has pressed the front panel button to Acquire Data. Attached is the code for the program.
Thanks to you all for leading me to the right direction (I hope)
I have other questions though for some other functions I want to implement in the program (which are not very relevant to the original topic title). Would it be better to start a new topic or continue the discussion here?
Attachments:
Resistivity Measurement v2.vi 159 KB -
How to close external programs?
Hi there,
in vbs is a command "ExtProgram(ExtProgramName, ExtProgramArg)" to
start external programs. But how to close external programs when
they finished its work? Is there a vbs-command for it? Is there a way
when calling "cmd.exe" with a proper parameter?
Martin BohmHello Martin!
Yes, with the tool 'tasklist' in the same directory.
The problem is that it is not easy to query from script. I tried it in the following script. Perhaps not perfect espacially because a command interpreter pop up every time you call the function.Option Explicit
If IsDIAdemRunning() Then
Call MsgBox( "At least one DIAdem is running!" )
Else
Call MsgBox( "No DIAdem at all!" )
End If
Function IsDIAdemRunning()
Dim oWshShell
Dim oExec
' Execute via Shell Object
Set oWshShell = CreateObject("WScript.Shell")
Set oExec = oWshShell.Exec( "C:\windows\system32\tasklist.exe /FI ""IMAGENAME eq DIAdem.exe""")
' wait until tasklist is finished
Do While oExec.Status = 0
Pause(1)
Loop
' no Standard Output -> no DIAdem running
IsDIAdemRunning = Len(oExec.StdOut.ReadAll) <> 0
End Function
A better solution might be possible via WMI.
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater? -
How to pause external vdos to play it again after played another vdo
Hey! I have a question.
I have many external vdos which I have loaded and randomly play them once at a time by press some keyboard buttons.
Let's give vdos named a,b,c,... and picture this....
When people press a button a vdo A is playing then someone press another button or the same button the vdo B will be played immediately.
The same thing happen to vdo B if someone press any button on keyboard to play vdo C. After every vdo has been played, the program will set all the vdos back so people can play it again now but, I do want it to play in exact same point where it left.
Right now, my code can ramdomly play all the vdo without repeat them untill it plays them all. But I know because I REMOVE the vdo out so that's why the program don't play it again like this: var NewStore:Array = VdoStore.splice(i,1);
I think this way can't make a program to remember the vdo's timeline. But I don't know whatelse can I do to do what I want.
Anyway,
Someone tell me to try out some index to the array and add ++ after playing. Then after index is more than Array's length, just reset index to 0 again.
So...Any suggestion on how to pause many external vdos??use the shuffle function to randomize your videos and then play from index = 0 to index=videoA.length-1:
function shuffle(a:Array) {
var p:int;
var t:*;
var ivar:int;
for (ivar = a.length-1; ivar>=0; ivar--) {
p=Math.floor((ivar+1)*Math.random());
t = a[ivar];
a[ivar] = a[p];
a[p] = t; -
How to pause while printing long long stuff
I'm using System.out.println printing several screen of data. How to pause in between, and resume displaying while user presses ENTER ?
thx for reply ^_^Study this program. It is not the better solution for your problem but could work.
import java.io.IOException;
public class Test {
public static void waitForEnter() {
try {
int ch;
while ((ch = System.in.read()) != -1 && ch != '\r') {
} catch (IOException ex) {
public static void main(String[] args) {
for (int i = 0; i < 100; ++i) {
System.out.println (i);
if (i % 16 == 15) {
System.out.print("More>");
waitForEnter(); -
How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?
I basically managed to learn how to invert parameters which allows me to be as default in the clean guitar channel and if I switch the first button on the midi foot controller I switch to crunch, but at this point I tryied so hard to programm the second and third button to switch, only through a button in one step, to a third channel for distorsion or a 4th channel for solo guitar but I couldn't figured out how this work can be done!
I would appreciate if anyone could help or share this experience with others who are experiencing the same problem.
Cheers.
F.I cannot seem to get mainstage to recognize my FCB either. I am using IFCB. Anyone figure this out?
Thanks,
Eric -
Hi all.
I would like some help on how to create a program. Im still very new to the Labview program so any help would be greatful.
Now granted that, heres my issue, ive got an assignment for a class that i have no idea where to start.
Heres the assignment:
You have a discount coupon that gives you a ten cent per gallon discount up to 15 gallons.
You purchase regular gas which is priced at $3.56 a gallon, you give the clerk $30.00 to purchase that much in gas. After applying the discount, how much would you actually have to pay?
For the controls and indicators, i need to show the Amount Tendered, the Discount, Gallons purchased, the Final Price and Discount Amount.
As ive said above, i have no idea where to start with this.
THanks all.lorddd337 wrote:
Actually i dont have the math worked out as of yet since i have no idea how to do the math that will apply to the program.
Then you need to work out the math first. This has nothing to do with LabVIEW or programming.
For each terminal, decide if it is an input (something the user controls) or an output (something the program will calculate based on the values of the other controls). Have you done that?
lorddd337 wrote:
Also i dont know which tutorial would work for this.
Whatever you just learned in class is probably sufficient. Else start the tutorials in order to learn the basics.
LabVIEW Champion . Do more with less code and in less time . -
How to schedule a program in background after 5 or 10 sec
Hi All,
Can anyone tell me how to schedule a program after 5 or 10 sec in background after the transaction is completed.
It is not a custom transaction. I want to execute a Z program in background in a BADI
Regards
Yathish
Message was edited by:
Yathish GundlupetProgramattically? You can add this code to the end of your transaction(if it is custom, of course).
report zrich_0004 .
data: sdate type sy-datum,
stime type sy-uzeit,
l_valid,
ls_params like pri_params,
l_jobcount like tbtcjob-jobcount,
l_jobname like tbtcjob-jobname.
start-of-selection.
* Get Print Parameters
call function 'GET_PRINT_PARAMETERS'
exporting
no_dialog = 'X'
importing
valid = l_valid
out_parameters = ls_params.
* Open Job
l_jobname = 'THIS_JOB'.
call function 'JOB_OPEN'
exporting
jobname = l_jobname
importing
jobcount = l_jobcount.
* Submit report to job
submit <your_program_name
via job l_jobname
number l_jobcount
to sap-spool without spool dynpro
spool parameters ls_params
and return.
* Kick job off 10 seconds from now.
sdate = sy-datum.
stime = sy-uzeit + 10.
* Schedule and close job.
call function 'JOB_CLOSE'
exporting
jobcount = l_jobcount
jobname = l_jobname
sdlstrtdt = sdate
sdlstrttm = stime
Regards,
RIch Heilman -
How to run a program as an administrator from within a non-elevated command prompt?
I have a project that is going to be running on a kiosk, and the user that is running the kiosk software is going to be restricted. I have an alternate administrator account, but I cannot seem to figure out how to open my program running as this administrator
user. I have tried to use runas, like so:
runas /user:admin kiosk.exe
However, when I try to run this command, it asks me for the password of the administrator account and my program doesn't open correctly. It fails to open at all. If I change the run as to a start command, then the program executes fine so its
not a problem with my software.
Is there a way to pass a password parameter to runas so that it will not prompt for the password every time? If there is not, can someone think of another way for me to elevate my process to administrator without being logged in as one through the
command prompt?Hi KevinGEAR,
You want to allow the others without the administrator`s level to run this software and meanwhile the administrator is not logged in, right?
Here is an alternative solution :
1.To work with this solution, a built-in administrator account should be enabled and meanwhile you can create a standard account. The built-in administrator account is different from the administrator account you created.
To enable built-in administrator account:
Ways to Enable / Disable the Built-In Windows 7 Admin Account
http://social.technet.microsoft.com/wiki/contents/articles/3040.enable-disable-the-local-hidden-built-in-administrator-account-in-windows-7.aspx
2. Use the following code
runas /user:ComputerName\Administrator /savecred "Full path to program's exe file"
Here is a link for reference:
Elevated Program Shortcut - Create for Standard User
http://www.sevenforums.com/tutorials/193743-elevated-program-shortcut-create-standard-user.html
NOTE: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites.
Best Regards -
How to open labview program with Quit Labview function inside?
Hi Any idea how to open labview program with Quit Labview function inside?
I forgot to add and set the condition of the type for this program.
If the program is an application, it would close straight away.
If it is still labview work, it will go straight to editing program without closing.
So I need to recover, open it and make some changes.
Clement
Solved!
Go to Solution.Put the VI in a project and open it from there, then it shouldn't autorun. You can use App.kind property of application to decide whether to close or not.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
How to call one program from another program
Hai,
How to call one program through another program.
Example.
I have two programs 1.ZPROG1 2. ZPROG2.
When i execute ZPROG1 at that time it should call ZPROG2.Hi ,
u can use submit statement to call a program .
DATA: text TYPE c LENGTH 10,
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
range_tab LIKE RANGE OF text,
range_line LIKE LINE OF range_tab.
rspar_line-selname = 'SELCRIT1'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-low = 'ABAP'.
APPEND rspar_line TO rspar_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'H'.
APPEND range_line TO range_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'K'.
APPEND range_line TO range_tab.
SUBMIT report1 USING SELECTION-SCREEN '1100'
WITH SELECTION-TABLE rspar_tab
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
regards,
Santosh thorat -
How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)
How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)
-
How to write driver programming in smartforms
hi Floks
<i>how to write driver programmig and how many types of driver programs available to trigger smartforms what are they . how to call the url in smartforms ?
help me out .thanking you ,</i>
with regards,
sureshHi
Try to get the Function module name from the smart form
how to find Driver program for a smartform
and now goto SE38 and create a progarm for calling the smartform
smartform driver program
Regards
Kathirve -
How to find how many times a program has been executed & by whom
Can any one help me to find log of program : Details like how many times the program(T-Code) has been executed and by whom(User ID) and when
Hi,
sy-uname will give u the name of the person.
sy-uzeit will give u the time of exection.
Not sure about number of times of execution.
<REMOVED BY MODERATOR>
regards,
Ramya
Edited by: Alvaro Tejada Galindo on Mar 19, 2008 4:15 PM
Maybe you are looking for
-
How to suppress duplicate records in rtf templates
Hi All, I am facing issue with payment reason comments in check template. we are displaying payment reason comments. Now the issue is while making batch payment we are getting multiple payment reason comments from multiple invoices with the same name
-
Disappearing e mails/ apple products failing
Having converted almost totally to mac 9 months ago, today, my e mails have started disappearing within 3/4 minutes. Since the ios6 update, my i pad and I phone will not get wifi in half of he house ( I mac still does). And Apple TV no longer communi
-
How to reset my ipad from my computer
how do i reset my ipad mini cause its been misplaced
-
Oracle 9i DB ODBC Connectivity Problem
i have oracle 9i release 9.0.1.0.1 and i want to use the oracle 9i DB in my VB Appplication how can i connect to the DB and what driver should i use.
-
Shifter register for array of waveforms
Hi guys, I was trying to use shift register to append waveforms from multiple channels to their previous waveforms correspondingly. The problem is when I click the stop button on the front panel and saved the data, the data file contains nothint exce