Stop whole program with one button
Hi, I've written a program for reading some values out of a measurement instrument. Now i want to have one button which stops the entire program no matter in which loop or which subVI the program is in. I have a subvi to make a connection to the device and i can't get out of this when he is trying to make that connection. Also the stopbutton i've used now is only read when the program is in a specific while loop. Can is solve this problem. I've attatched my program.
Attachments:
oplossing2.vi 74 KB
You will need to use global variables to communicate between VIs. Don't make it a habit since using them can lead to race conditions and synchronization problems, so I would recommend that you look into functional global variables, semaphores, notifiers and queues. The Help document in LabVIEW has detailed explanations on each one of them.
You will need to call a subVI in parallel if you want to continue with the execution of other tasks in your mainVI. I have created a quick example which shows the use of a global variable and using a subVI in parallel.
Message Edited by Adnan Z on 02-17-2009 04:31 PM
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Attachments:
Example.zip 13 KB
Similar Messages
-
Print the whole site with one button
Hi All
This may sound like a stupid question, but
I wonder if someone can help me, is there a way of having a
button that would print the whole site - rather than separate html
pages. - without having/using a pdf file .
Regards
Lorna17No.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"lorna17" <[email protected]> wrote in
message
news:eci4gv$h7l$[email protected]..
> Hi All
> This may sound like a stupid question, but
>
> I wonder if someone can help me, is there a way of
having a button that
> would
> print the whole site - rather than separate html pages.
- without
> having/using
> a pdf file .
>
> Regards
> Lorna17
>
>
>
>
>
> -
How to insert into 2 tables from the same page (with one button link)
Hi,
I have the following 2 tables....
Employees
emp_id number not null
name varchar2(30) not null
email varchar2(50)
hire_date date
dept_id number
PK = emp_id
FK = dept_id
Notes
note_id number not null
added_on date not null
added_by varchar2(30) not null
note varchar2(4000)
emp_id number not null
PK = note_id
FK = emp_id
I want to do an insert into both tables via the application and also via the same page (with one button link). I have made a form to add an employee with an add button - adding an employee is no problem.
Now, on the same page, I have added a html text area in another region, where the user can write a note. But how do I get the note to insert into the Notes table when the user clicks the add button?
In other words, when the user clicks 'add', the employee information should be inserted into the Employees table and the note should be inserted into the Notes table.
How do I go about doing this?
Thanks.Hi,
These are my After Submit Processes...
After Submit
30 Process Row of NOTES Automatic Row Processing (DML) Unconditional
30 Process Row of EMPLOYEES Automatic Row Processing (DML) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
50 Insert into Tables PL/SQL anonymous block Conditional
My pl/sql code is the same as posted earlier.
Upon inserting data into the forms and clicking the add button, I get this error...
ORA-06550: line 1, column 102: PL/SQL: ORA-00904: "NOTES": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
Error Unable to process row of table EMPLOYEES.
Is there something wrong with the pl/sql code or is it something else? -
Export two TXT files with one button
Hi,
I'm using Application Express 2.0, i'm developing aplication in which users import few different excel spreadsheets and after that they export date in specified TXT format.
I'w like to create functionality to export two and more files in CSV (TXT) format with one button and one click only in defined folder. It's necessary to simplify work of my endusers becose they have to generate ten or more files.
Is it possible create functionality which generate files in defined folder without any addtional user's action?
Best,
KirilCreate a procedure to output the files, use the oracle directory object to define your output path.
create or replace directory wayne as '/csv';
use google or metalink to get examples. This way you can output as many files as you want, my personal opinion would be to create a dynamic report your users could run on demand. -
Entire JDBC communication stopped if problem with one single JDBC interface
Hello,
Will the entire JDBC communication stopped if problem with one single JDBC interface?
Thanks,
Soorya.hi surya,
this will happend if u use maintain order at runtime at interface determination.
just uncheck this option if u dont neet EOIO.
if you are getting the problem if u r going for EO then the problem might be using same JDBC channel for all interfaces.
if each interface is expected with a high load then it better to go for dedicated channels for interfaces.
like INTERFACE A should use JDBC A channel and INTERFACE B should use JDBC B channel.
Thanks & Regards,
Rama krishna -
JDBC communication stopped if problem with one single JDBC interface
Hello,
Can you please explain this phrase
"JDBC communication stopped if problem with one single JDBC interface"
THanks,
SooryaIf you are having a problem with a JDBC interface (lets consider this to be a communication channel) then the communication is stopped (via that channel) (only in the case of EOIO).
Hope this clarifies.
Cheers,
Sarath
Award if helpful. -
Can we perform two actions with one button with two clicks one after other?
Sir,
can we perform two actions with one button with two clicks one after other?
I want that when I click an Add Button first time it add data to the database and when I click again this button it clear the form data to empty fields.
Regards
TanvirIn code it should be easy.
The following code adds a button called butman with a text "ADD".
It then registers a listener that will be called if the button is clicked.
This listener then calls the runAddData method if you clicked on butman while it contained the "ADD" text and it will call the runClearData method otherwise.
Therefore it will swap the button's functionality between ADD and CLEAR on every click.
final Button butman = new Button("ADD");
butman.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
if (butman.getText().equals("ADD")) {
butman.setText("CLEAR");
runAddData();
} else {
butman.setText("ADD");
runClearData();
} // END IF-THEN
}});I hope this is what you wanted.
Some extra food for thought.
You might want to run the ADD and CLEAR methods in their own threads so that it can run in the back ground, without slowing down your user interface.
I also like to rather reuse one button for multiple functionality in stead of making an application with hundreds of nodes only used rarely with masses of code to show and hide them if needed. -
Hi experts,
Does anyone happen to now any pop up window with one button(OK button)?
Regards,
MarcHi,
This Function Module contains only OK button.
POPUP_TO_INFORM
Hope this will help.
Regards,
Swarna Munukoti. -
Loadjava puts the whole program on one line
Hi,
I have used the loadjava facility standalone and within Oracle9i jDeveloper and found that when I upload the java source, it puts the whole program on one line. Also if I have left blank lines in the source code, they appear as 'null' in the stored procedure.
See below is my code:
package mypackage1;
public class HelloWorld
public static String world ()
return "Hello world";
}and this is what it looks like if I open the Java classes in jDeveloper:
package mypackage1;nullpublic class HelloWorld{ public static String world () { return "Hello world"; }}nullI am using a windoes 2000 box.
Why is this happening?
Thanks
JagThanks, i'll try it out,
However, it isn't just the code that appears on one line. All teh functions and packages all appear on one line and they are generated either by JDev and hence are out of my control.
You would have thought that this would have been one of the types of things the JDeveloper development team would have tested, so i'm hoping it just a configuration somewhere.
Thanks
Jag -
Backspace Button deleting whole sentence with one click ...
Hey guys, I really need some help here ... When I'm typing on my BlackBerry Curve 8520 and when i press the backspace (Delete) button it erases the whole sentance, and i was wondering if it was just me with this problem and how do I fix it? ... Also if i want to do at smily face it wont let me hold alt and then press H and then Y i have to press alt H and then alt Y ... Please someone help
Hi Ponta,
How can I set up or use Numbers so that when I want to change the fill color of a cell, I can just click once and not have to go through a whole sequence?
I don't see a way to add a colour fill with one click. The Mac way is to select something (point and click):
"Hey, You!"
and then give it an order:
"Do this!"
Numbers 3.2 retains the glorious Colour Window of Numbers 2. Menu > View > Show (or Hide) Colors (shift command c)
Select the cell(s) where you want a backgound fill:
Now drag a colour (for example, Honeydew from the Crayons Palette) to one of the selected cells:
Edit:
is there a way to set up a dozen or so of my favorite colors somewhere so I can select a cell then just click the one I want?
Yes. Salmon dragged from the Crayons Palette to a Custom Palette at the bottom:
Still there after I Quit Numbers without Saving . Drag from the Custom Palette to selected cells:
Regards,
Ian.
Message was edited by: Yellowbox. Custom Palette. -
Hi all,
I would like to know can I program a start / stop action with a buttion. That means I start a process with a button and I can terminate with an other button.
Many thxIt depends what do you mean by "process" you may be able to stop a query while running by setting the Forms' "Interaction Mode" property to "Non-Blocking" and you can stop a query.
For other processes you may have different logic depending on your requirements.
Tony -
Pause & restart timeline with one button
I have created a lengthy animation as a prop for a TV
production. They want to be able to start and stop the animation at
will using only the mouse without anything being seen on the
screen. To do this I want to make an invisible button that covers
the entire screen. I know how to make it either start or stop, what
I can't figure out is how to make the invisible button start and
stop the timeline with alternative clicks ie click 1 starts it,
click 2 stops it, click 3 restarts ad infinitum.
Any help would be much appreciated
RalphHi Cevema,
The instance name is the instance name of the clip. When you
select the
clip on the timeline, open up your Properties Inspector. In
the
lower-left-hand corner there should be a "MovieClip" pull
down and
probably a text box with "<Instance Name>" in it. This
is how Flash
recognizes which clip you want to target. Add the name here
(no spaces,
don't start with a number, no special characters), and this
is your
instance name. Then, replace the "someClip" with the instance
name. Say
you used, "myInstance" for the instance name, your code would
be:
this._parent.myInstance...
You would do this anywhere where "someClip" appeared in the
example I
showed you.
In order for that code to work correctly, you will need to
ensure that
it is ON the button (not the timeline or anything). Also,
your clip
instance needs to be BESIDE your button on the timeline.
Here's how:
1. Your movie clip (the one to control) should be on a frame.
The button
you want to use to control the clip should be on the same
frame. It
shouldn't be inside the clip you want to control, in another
scene, or
anywhere else.
2. When adding code to your button, select it (don't open it
so you can
see "DOWN"/"UP"/"OVER" frames), hit F9 (or open the actions
panel) and
add the code there.
The reason you need to be careful when adding this code is
because of
something called scope. You'll notice that in the code I use
a keywor
called "this". It literally means...this! So if you are
putting this
code inside of some movie clip, "this" will refer to the
movie clip. In
this case, "this" refers to the button. "_parent" refers to
the movie
clip in which the button lives. It's like a word map....
this._parent.someInstance >>> From "this", look in
my "parent", and in
there look for something with instance name "someInstance".
Hope that clears it up.
Patrick
Cevema wrote:
> Many thanks for your speedy help. Whilst I find creating
the drawings and
> animations easy as a graphic designer action script is
like a foreign language
> to me!
> By clips "instance name" would that be the final name of
the swf or 'scene
> one'? Sorry to sound so thick but I can't recall
"instance names" coming up in
> my DVD course.
> Many thanks
> Ralph
>
http://www.baynewmedia.com
Faster, easier, better...ActionScript development taken to
new heights.
Download the BNMAPI today. You'll wonder how you ever did
without it!
Available for ActionScript 2.0/3.0. -
How can i redirect to with one button to different pages!
Hi All,
For any application, for the first time,if a new table exists then there will no data in that table.
based on this scenerio,in my application,i am handling apex validation staying that "you have no data. Please click here to go Reset symbol page.
when it redirects to Reset symbol i am providing a text box and with a button. Once there enter a symbol and click on button it will inert in that table and again redirects to Home page for say-39.
simillarly what are the functionality available in home page i had implemented same thing but only it differs page no for say-115.
In both the scenerio's i will be redircting reset Symbol page where there can insert a symbol explained in above scenerio case.
My problem is when i am throwing the error msg from page-39 i am redirecting to Reset symbol and when there enter symbol and click on button again i will be redirection t page -39 because the error had came from page-39.
If the same error comes from page-115 then also i will redirecting to same Reset Symbol where there will be entering symbol and click on button, in this case it should redirect to page-115 instead of page-39 because i have got error from page-115 but not from page-39.
How to handle the above scenerio, please help me out.
Thanks in advance,
Anoo.Hi Andy,
Thanks for your suggestion, it is working fine..But i am facing one problem in page 115, i have two regions and both regiosn have same name but only difference is items names.. when i had tried to rediect to page-115 the umwanted one regions is showing instead of expected region. It is getting failed here bec it is rediecting to differnet region.
Any suggestion on this!
Thanks,
Anoo.. -
How to run two programs with one PC and two monitors
Good Morning,
I have a requirement to run a parallel loop and update the progress in two monitors with one computer.
For ex: its a two test stage, the process and progress of the 1st stage needs to displayed in monitor1 and similarly for 2nd stage to monitor 2 with program running with one computer.Would it be possible to do that.
Thanks in advanceHi Parker,
yes, it's possible. You also have properties to set windows to specific monitors...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How can I stop a program until a button will be clicked
I have a class that create a JTable and in this class I have two columns, the first culumns has the name of the variables an the second column has a checkbox to select the correponding variable.this JTable is created from a vector originating in other class. I need obtain a vector of integers with the number of the variable selected after the JButton will be clicked. For this i create a method called EspererSeleccion. This is the class
import javax.swing.table.AbstractTableModel;
import java.awt.*;
import java.awt.event.*;
import javax.swing.table.TableColumn;
import javax.swing.border.Border;
import java.util.*;
import javax.swing.*;
import java.lang.Integer;
public class MiTabla extends JFrame implements ActionListener
//Variables de Instancia
private boolean DEBUG = true;
public boolean TERMINA=false;
public Vector Valores=new Vector(1,1);
//Constructor de objetos de la clase MiTabla
public MiTabla()
super("Variables");
Border empty;
MiModelodeTabla myModel = new MiModelodeTabla();
JTable table = new JTable(myModel);
table.setPreferredScrollableViewportSize(new Dimension(300, 200));
TableColumn column=null;
column = table.getColumnModel().getColumn(0);
column.setPreferredWidth(220);
column = table.getColumnModel().getColumn(1);
column.setPreferredWidth(80);
//Crea el scroll pane y agrega la tabla en el.
JScrollPane scrollPane = new JScrollPane(table);
empty= BorderFactory.createEmptyBorder();
JButton boton=new JButton("Aceptar Seleccion");
boton.setBorder(empty);
boton.addActionListener(this);
getContentPane().setLayout(new BorderLayout(100,0));
getContentPane().add(scrollPane, BorderLayout.CENTER);
getContentPane().add(boton, BorderLayout.SOUTH);
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
setDefaultCloseOperation(HIDE_ON_CLOSE);
dispose();
//System.exit(0);
//clase MiModelodetabla
class MiModelodeTabla extends AbstractTableModel
MiVector v=llamaVector();
int numElementos=v.size();
private int i,j;
public final Object[][] data=new Object[numElementos][2];
final String[] columnNames = {"Variable",
"Seleccion"};
public MiModelodeTabla()
CreaListas();
public void CreaListas()
for (i=0; i<numElementos; i++)
data[0]=v.elementAt(i);
for (j=0; j<numElementos; j++)
data[j][1]=new Boolean(false);
public MiVector llamaVector()
MiVector V1=new MiVector();
v=V1.addElementos();
return(v);
public int getColumnCount()
return columnNames.length;
public int getRowCount()
return data.length;
public String getColumnName(int col)
return columnNames[col];
public Object getValueAt(int row, int col)
return data[row][col];
public Class getColumnClass(int c)
return getValueAt(0, c).getClass();
public boolean isCellEditable(int row, int col)
if (col < 1)
return false;
else
return true;
public void setValueAt(Object value, int row, int col)
data[row][col] = value;
fireTableCellUpdated(row, col);
if (DEBUG)
String s=new String("true");
Integer I=new Integer(row);
String S=value.toString();
if(s.equals(S))
Valores.addElement(I);
else
Valores.remove(I);
value=(Object)value;
public void EsperarSeleccion()
while (TERMINA==false)
int i=0;
TERMINA=false;
public void actionPerformed(ActionEvent e)
TERMINA=true;
dispose();
and this is the method that create the JTable but when i call the method EsperarSeleccion the program fail and the JTable is not visible only the frame that contains It.
How can I do to stop the program or the actions until the JButton will be clicked using and other method diferent from the EsperarSelection method
Vector leeVariablesRelevantes ()
System.out.println ("Variables relevantes");
MiTabla frame = new MiTabla();
frame.pack();
frame.setVisible(true);System.out.println("El vector tiene "+frame.Valores.size()+" elementos");
int i;
for (i=0; i<frame.Valores.size(); i++)
System.out.println("El elemento "+i+" de el Vector es: "+frame.Valores.elementAt(i));
System.out.println();
return frame.Valores;Say,Class A contains JTable and in Class B you wish to acess the vector which contains the things required by you.
First you have to get the reference of Class B in Class A.
It can be done in the following way.
In Class B ,you create a static method like this.
public static ClassB getObject()
return this;
}Now you can get the Class B's object easily via this method.
Again in Class B , you write a method which will handle your requirment.(Let this method name be doThings( Vector vector))
Now in Class A's actionPerformed() ,when the buton is pressed ,just call doThings() and pass the vector.
Maybe you are looking for
-
On my iphone 4s. When I tap on the messages icon, it opens my inbox with all the messages recieved. If I then want to read the message, and tap on it, I get a grey screen. It was'nt always like this, so I must have done something wrong somewhere. Can
-
How to configure Broadcast messaging for IC Webclient profile
Dear all, How to configure Broadcast messaging for IC Webclient profile. what are the prerequisites for it? We are not using EP interface for IC Webclient, then where can I find broadcast messaging URL in SAP CRM system. I have checked for the releva
-
Is it possible to play different sounds for emails and instant messages ?
Hello, I was wondering if it was possible to play different sounds for emails and instant messages. I am using Thunderbird quite often with both emails and instant messages imported from Gtalk. I think it would be very convenient to be able to distin
-
JPY Currency - Decimal Notation in SMARTFORMS
When outputing an amount field how do you ensure the correct number of decimal places is displayed in smartforms?
-
Runtime error DATASET_REOPEN ~ CX_SY_FILE_OPEN
Hi, I am having a problem with open a dataset. The u201COPEN of P_fileu201D is called multiple times in this program.. I have referred question on cx_sy_file_open process.But it is not answered yet. Any inputs on this. Thanks Kiran