Operation Subvi don't update in the main program
Hi all
I'm having trouble with a VI I put together for laboratory research. I try to use two of the Subvi: one writes nine analog outputs through a PCI-6723, the other sends the commands M Code to a linear positioner through COM 4. Both work individually, but when I put in another VI, it seems that the outer loop only runs once. If I set a post and hit run, the track moves to this post but does not meet the additional entries. The tension control is doing absolutely nothing, predefined or not. The goal is that the two Subvi to run in real time. In other words, change the enum of the piece will automatically update the position and moving the sliders of tension with voltage indicators in real time and updated. I tried a few configurations without luck. Maybe it's because I'm trying to use a serial port and a data acquisition?
I have attached the main VI and Subvi for review. All advice is appreciated.
'Is it maybe because I'm trying to use a serial port and an acquisition of data?'
No, that would be a silly limitation of the language
There are a lot of problems with your application (on the other hand, you use a LabVIEW project to your hand and subVIs), like crazy in the Subvi DAQmx structures.
The real bug you see, that's the reason why you do not understand how a shift register stores the data: using shift registers initialized to the two subVIs, so overwrite you the values stored in each iteration. You should learn about Global Variables functional and motor action, so you can understand the problem. If you need work on your subVIs (also), you will need to change their behavior. In their recent form, they are not able to do what you want... Do not have a state machine for the subVIs, use actions: Init, check, change, close. Therefore, it is very important that your subVIs only perform one action at a time. Finally, when you stop your hand while loop in your main VI, you call the two subVIs with action command 'Close' to close and delete tasks properly.
Here's some reading more: http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/td-p/503801
Tags: NI Software
Similar Questions
-
Hi LV users,.
I have a very basic question, I have not succeeded to asnwer using basic considerations.
I made a sub - vi that performs a scan of current-voltage using a unit of measurement-source Keithley and a loop FOR.
The subvi outputs 2 tables with my data (essentially an array of voltage and the corresponding current table). I also defined a Terminal at the exit of a group of these 2 tables in order to plot a graph XY - output. Specifically, I indexed this cluster to update after each iteration of the loop FOR, in my sub - vi (the indicator is placed outside the loop, of course).
My problem is that I want my main program to display the XY-graph in real time, with an update after each iteration of the loop FOR which is in my sub - vi.
I have a problem because my sub - vi output terminals are available for the main program concluded as soon as the sub - vi has completed its own execution (which is what we expect of sub - vi to do).
How can I use a sub - vi (because it's handy) and get in the main program in the course of its performance data that are generated from the loops of sub - vi?
Thanks in advance for your help,
Yoyo87
Elements of the queue in the Subvi them put your main VI where you want to display the data and the.
It is similar to the architecture of producer/consumer. There are examples of it in LabVIEW. The examples work with 2 parallel loops, in your case a loop (the producer) will be in the Subvi.
-
Hi ppl,
I searched through the forum on the topic above, but still don't know how to do this. Maybe one of you can post the solution of this important issue.
I have attached a very simple program: I've done a few while loop as a main program and Subvi as a post-secondary program. Inside the Subvi also manages some while loop. All I want to do is to push the stop button in the main program that will stop the while loop in the second channel; to create a kind of judgment of reference in the main program which influence only the stop button on the Subvi. During this time the loop of the main program will still work.
Thank you.
I modified the code that you have joined. check.
-
Subvi in the main program output data
Hello
I'm trying to export data from sub - VI for the main program in real time. But I found the value may be filed only when the Subvi is finished.
I'm doing some research and I think that using the queue is the best, but the global variable. You can all give me some tip on queue using to transfer data from sub - VI for the main program in real time?
Thank you!
No problem.
-
Issue linking subroutines VI by the main program
Sir/Madam,
I've done some subprogrammes VI of "Keithley 2400', but I'm having the problem by connecting them together with the main program.» In fact the subprogrammes of created VI do not display any button to activate when I connect the 'action.vi' file in the 'read.vi' file (attached).
Please give suggestions.
Concerning
Yachika Manglik
-
HOW TO PASS THE HEX OF THE MAIN PROGRAM VI ENUM, SUB VI ENUM VALUE
HOW TO PASS THE HEX OF THE MAIN PROGRAM VI ENUM, SUB VI ENUM VALUE.
HOW THEN IT WILL CHOOSE CORRECT ON SUB VI HEXAGONAL ENUM VALUES.
Enum values are strings, you must first convert the hexadecimal value to a hexadecimal value chain represtation.
Then that convert from the enum.
-
cannot receive a third beacase of the updates of the firewall program "I guess"
cannot receive a third beacase of the updates of the firewall program "I guess"
What can I do?
Oren Ben Am Hello,
Which firewall do you use?
How could you identify what the firewall prevents the application of updated?
If you use a third-party firewall, you can disable it and enable the Windows Firewall. It should automatically identify the programs that need to access the Internet and will prompt you for permission.
Can't wait to hear back on your part.
Steven
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think -
How to get the return values by a button on the main program.
Hello
I have a main program that has an Authenticate button. Click to authenticate open for auth form that has the USERNAME and PASSWORD FIELDS.
If the input fields are true then enable editing of jtable in main program...
Basically something like this:
main program
Authenticate.addActionListener (new ActionListener()
{
public void actionPerformed (ActionEvent ae)
{
Au UpdateAuth = new UpdateAuth(); / / Opens the form that has the username and pass for authentication
ua.setVisible (true);
need code for activation of table here
if(s=="mactus")
{
enable editing of the table
}
table.repaint ();
}
});
form opened for auth... (class UpdateAuth)
private String SigninMouseClicked (java.awt.event.MouseEvent evt) {}
String aname = Aname.getText ();
String apass = Apassword.getText ();
If (aname. Equals("") & & apass.equals(""))
{
JOptionPane.showMessageDialog (null, "enter the login name or password", "Error", JOptionPane.ERROR_MESSAGE);
}
If (!) (Aname.Equals("")) & & apass.equals("")))
{
If (aname. Equals("harshil") & & apass.equals ("harshil123"))
{
String s = "mactus"; If the user name and password is success enable editing in table in the main program
return s;
}
else if (! aname.equals ("mactus") & &! apass.equals ("mactus123"))
{
Aname.setText("");
Apassword.setText("");
}
}
Returns a null value.
}String.Equals (String)
String.equalsIgnoreCase (String)
-
Update of the main screen to a background thread
Hi guys im trying to update the main screen from a background thread. in this case I'm using a 2 static pictures. Once I click on a butotn on the popupScreen when the application is loaded, it will update the image on the main screen.
I wrote a small excerpt for it and can you please give me some help with this. because when I've debugged and one of the developers helped me thereby to discover that the screen im trying to update is not the active screen. Please have alook please.ive extract have 3 classes here
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SerializableAttribute public class MyApp extends UiApplication
{Public Shared Sub main (String [] args)
{
Create a new instance of the application and make the currently
who runs the thread of the application of the event dispatch thread.
MyApp PAP = new MyApp();
theApp.enterEventDispatcher ();
}
/**
* Creates a new object MyApp
*/
public MyApp()
{
Push a screen onto the stack in the user interface for rendering.
pushScreen (new MyScreen());
final Pinpopup pp = new Pinpopup();UiApplication.getUiApplication () .invokeLater (new Runnable()
{
public void run()
{
UiApplication.getUiApplication () .pushModalScreen (pp);
}
});
}
}
///////////////////////////////////////////////////////////////////////////////////////// public final class screen extends MyScreen
{
/**
* Creates a new object of MyScreen
*/
public Bitmap bmp image;
public BitmapField bmpField;
public ButtonField btnDisplay;
public ImageThread imgThread;
public MyScreen()
{
Set the displayed title of the screen
setTitle ("MyTitle");
BMP = Bitmap.getBitmapResource ("image.png");
btnDisplay = new ButtonField ("Display");
bmpField = new BitmapField (bmp);btnDisplay.setChangeListener (new FieldChangeListener() {}
' Public Sub fieldChanged (field field, int context) {}
TODO self-generating method stub
if(Field == btnDisplay)
{
BMP = Bitmap.getBitmapResource ("image1.png");
bmpField.setBitmap (bmp);
signInButtonClicked ("07760926037", "1234");
LaunchImageThread();
}
}
});
Add (bmpField);
Add (btnDisplay);
}
Public Sub LaunchImageThread()
{
imgThread = new ImageThread (this);
System.out.println ("THIS screen:" + this.getScreen ()); I realized that the im screen update is not active but its strange I don't create any other refrence so
New Thread (imgThread) m:System.NET.HttpListener.start ();
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// POPUPSCREEN CLASS
class Pinpopup extends PopupScreen //implements FieldChangeListener
{
private ButtonField btnOk;
Pinpopup()
{
Super (new HorizontalFieldManager());btnOk = new ButtonField ("Sign In");
btnOk.setChangeListener (new FieldChangeListener() {}
' Public Sub fieldChanged (field field, int context)
{
TODO self-generating method stub
Try
{
if(Field == btnOK)
{
Close();
MyScreen ms = new MyScreen();
Mrs. LaunchImageThread();
}
} catch (IllegalArgumentException e) {}
TODO: handle exception
System.out.println ("Exception Popup all in signingIn" + e.getMessage ());
}
}
});
Manager fieldManagerContext = new Manager (USE_ALL_WIDTH)
{
' public void sublayout (int width, int height) {}int xPos = 10;
int ypos = 40;Field = getField (0);
layoutChild (field, 280, 50);
setPositionChild (field, xpos ypos + 100 + 165);setPosition (300, 300);
setExtent (350, 225);
}
};
fieldManagerContext.add (btnOk);
Add (fieldManagerContext);
}
}/////////////////////////////////////////////////////////////////////////////////////////////////////
/ public class ImageThread implements Runnable
{
private MyScreen parent;
public ImageThread (MyScreen myScreen)
{
parent = myScreen;
}public void run()
{
Try
{
UiApplication.getUiApplication () .invokeLater (new Runnable() {}
public void run() {}
TODO self-generating method stub
System.out.println ("active screen:" + UiApplication.getUiApplication () .getActiveScreen ());
System.out.println ("active screen:" + parent.getScreen ());
parent.bmp = Bitmap.getBitmapResource ("image1.png");
parent.bmpField.setBitmap (parent.bmp);
}
});
}
catch (Exception ex)
{
System.out.println ("Exception in Thread:" + ex.getMessage ());
}
}
}was soon thanks
I suspect that this is your problem:
MyScreen ms = new MyScreen();
Mrs. LaunchImageThread();I suspect that if you did as I suggested on the other Thread and put a breakpoint in the constructor of MyScreen, you'd have foiund, this creates a second instance.
I hope that you can take it from here.
-
Software of blackBerry operating Z30 will not update to the latest version
10.3.2.2474 according to the link for Blackberry is available to update me. Despite goes 4 or 5, it stops at 7% and says check connection, or try again. I've done both. It's maddening that she does. Moreover, the phone says there is no new update - contradiction!
If you take the SIM card out of the camera and reboot, you can get notification of update of the software on the device.
-
Update of the main screen at the click of the button
Hello world.
I am very new to BB programming without any programming background at all (I am a philologist). Just try to understand everything now.
I wrote a test code (in this case OS5) who must do the following - the main screen contains a key, which would add a text on the main screen.
The code goes here:
Class MyApp
package mypackage; import net.rim.device.api.ui.UiApplication; public class MyApp extends UiApplication { public static void main(String[] args) { MyApp theApp = new MyApp(); theApp.enterEventDispatcher(); } public MyApp() { pushScreen(new MyScreen()); } }
Class MyScreen
package mypackage; import net.rim.device.api.ui.Field; import net.rim.device.api.ui.FieldChangeListener; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.component.ButtonField; import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.container.MainScreen; public final class MyScreen extends MainScreen implements FieldChangeListener { private ButtonField buttonField; private MyScreen myScreen; public MyScreen() { setTitle("Test clock"); buttonField = new ButtonField("Press me", ButtonField.CONSUME_CLICK); add(buttonField); buttonField.setChangeListener(this); } public void fieldChanged(Field field, int context) { if (field == buttonField) { go(); } } private void go() { synchronized(UiApplication.getEventLock()) { myScreen.appendLabelText("Update"); }; } public void appendLabelText(String text) { LabelField labelField; labelField = new LabelField(); labelField.setText(labelField.getText() + " \r\n" + text); } }
Could someone make it clear to me how I can get the expected result of what I have?
Thanks for your help.
to correct the code above you can:
-set the LabelField as a class variable
-Add the LabelField on-screen
-call setText on this LabelField rather than your method appendLabelText -
Don't update to the latest version of the apps
Hey there,
I borrowed an iMac to work on a larger project in first. The owner has also used creative cloud, but he had a version that was not editable? The iMac was running in a larger company. So I connected with my normal account and tried to the first update to the version of 2016, because I have to open my project and will not make the old version. It was impossible to update any recent version. 2015 kept reappearing. Deletion of everything and even using CC Cleaner and downloading everything new reboot afterwards, did not help at all. The 2015 Version guard reappear. What can I do?(Save my project to IDML works, too. When I save as on my MacBook, I can't pass the file format. "So if yo have an idea about it, I'd be more than happy, too!)
Tanks lot!
I don't think that a cc 2016 first pro again, released the latest version of first pro must be CC 2015.2
Make sure you have the latest version 2015.2 installed (it will be available for Mac OS X 10.9 or later)
to check the launch first pro version, then click first pro menu and choose first pro
-
Clip names don't update in the order
Hello
I recently spent FCP7 to PPCC and so far, there has been a rough transition. In this specific case...
I wanted to ask if someone has faced the issue of drag any video or audio clip in a sequence and then rename the clip inside the project at a later date window... MINE ISN'T UPDATED IN THE SEQUENCE TO THE NEW NAME.
It remains exactly the same regardless of changes of name, you make in the project window.
Any help would be greatly appreciated.
Thank you
Kyle
That is right.
Once in the timeline panel does not change.
If you want the new name appears in the timeline panel, you will need to replace the clip.
-
The main program is seen as a separate thread?
I tried to stop a GUI based program opening too fast because the splash screen has not been seen for a long time enough.
So I tried to use the classes Thread and can be walked in the GUI Builder.
Trying different things, I got it to do what I wanted: a delay of 10 seconds before the GUI of the program display.
But I don't understand why main is not considered a separate thread and continue to get visible regardless of the status of delayThread.
Now, maybe a better way to do would be to go the setVisible of the manufacturer, the run method statement.// Constructor: // --------------- public Hotel (int numberIn) { // Create the time delay thread so that users may enjoy the splash ! delayThread = new Thread(this); delayThread.run(); // Initialise the number of rooms and the GuestList : noOfRooms = numberIn; guests = new GuestList(noOfRooms); // Graphics settings: setTitle("Hotel"); setLayout(new FlowLayout()); // etc. etc. // etc. etc. setVisible(true); } // A run method to delay the program opening: public void run() { try { delayThread.sleep(10000); } catch(InterruptedException ie) { ie.printStackTrace(); } }
Maybe there's something even better to produce a delay in the opening of the program.
But I'm still curious why the main thread has been delayed by a delay in what is really a completely separate topic.
Any ideas?
Published by: KonTiki on February 16, 2013 13:10
Published by: KonTiki on February 16, 2013 13:19
Published by: KonTiki on February 16, 2013 13:20
Published by: KonTiki on February 16, 2013 13:21
Published by: KonTiki on February 17, 2013 09:16Are you sure that show you all the relevant code? I think that, as is the case, the thread in sleep does nothing.
-
Run the main program simultaneous child concurrent program
Hello
I am trying to execute the concurrent program of child of the main competitor program as below, could you suggest me on below.
Database: 10 g
Main_Concurrent_Program
=================
1) will update the intermediate table XXID_PO_ITM = 1,2,3,4,5 Batch_id
This staging table has 1000 rows, so each 200 lines will be updated with one of the above batch_id
This logic works.
Child_Concurrent_Program
================
(2) above program main competitor has to call under Child_Concurrent_Program.
This Child_Concurrent_Program will be setting batch_id (based on above batch_id)
So, this Child_Concurrent_Program is expected to launch with batch_id = 1
Simillarly, Child_Concurrent_Program should start with batch_id = 2
Child_Concurrent_Program should start with batch_id = 3
Child_Concurrent_Program should start with batch_id = 4
Child_Concurrent_Program should start with batch_id = 5
Could you give me some suggestions on this?
Thank you.Check with FND_SUBMIT to submit a simultaneous work with dependencies of the child. Keep in mind that once you call the API... it creates its own thread and and becomes a standalone process. Control is no longer maintained in the calling package.
procedure submit_interface_data(p_schedule_date in date,p_mm_header_id in number,p_req_id out number) is v_user_id number; v_application_id number; v_responsibility_id number; begin select user_id into v_user_id from fnd_user where user_name = 'USER123'; select application_id, responsibility_id into v_application_id, v_responsibility_id from fnd_responsibility_tl where responsibility_name = 'General Warehouse'; fnd_global.apps_initialize(v_user_id,v_responsibility_id,v_application_id); p_req_id := fnd_request.submit_request ( application => 'XYZ', program => 'MOVE_CONC_SHORT_NAME', description => null, start_time => p_schedule_date, sub_request => false, argument1 => p_mm_header_id); commit; exception when others then spl_log_pub.write_exception(transaction_id => null, transaction_type => null, error_message => '
' || 'sqlcode: ' || sqlcode || 'sqlerrm: ' || sqlerrm); end submit_interface_data; Published by: sreese on May 18, 2012 15:16
Maybe you are looking for
-
a new backup on external hard drive replaces a precedent already on the disc
backup to an external hard drive replaces a previous backup already on the disc
-
Re: How to disable boot PXE 2.1 Pre on Satellite M40?
PeopleI would like to disable the PXE 2.1 Pre boot that seems to be part of the BIOS on my laptop. It's just a gene such that it expires after a while.the laptop isSatellite M40-136BIOS V1.702048 MB RAMWin XP Pro operating system I don't see a settin
-
CM1312nfi: Recovery run out of food, Fax Reset Settings &; invalid parameter
The machine will not fax. Error message is two lines which are superimposed: Power failure recovery Reset fax settings Did a reset, Download driver successful Latest version of the software, full download failure at end with error message on compute
-
CDAQ line internal uses as to task DAQmx
Hello I have a cDAQ-9178 and I would send a trigger to two different tasks (DO and HAVE) to be sure that they start at this very moment. I want to pull the trigger using the software instead of and the external trigger on PFI lines for example. For e
-
I have a laptop Dell Duo and every time I put a new image as my backround it zoomed upward and I can't see the whole picture. How can I fix it? Someone please help