Problems calling SubVI
Hi,
I am currently writing a program in which I need a "pop up" SubVI.
The SubVI opens when the user presses a button and closes again when it is finished. I am doing this with an event structure.
Tha main program consists of several while loops.
When I start the program for the first time, everything will run fine. If I now stop the main program with the LabView stop button and the restart the program, everything is still running fine.
If I however stop the program by terminating all the while loops in the main program and then restart and Call the SubVI, the main program will behave as if everything works fine, however the SubVI Frontpanel (or the entire SubVI, I don't know) won't open.
I really have no Idea what I did wrong there. Apparently the way I close the program does make a difference. As I undestand it, however it shouldn't, should it?
Or does it matter, that the "Pop Up" Sub-VI is called in an extra SubVI that doesn't pop up?
I have tried to reproduces this scenario in a simple example that I've attached. However, even though it is in all means similar to the real program, here, the error doesn't occur.
Maybe anyone of you had the same problem before or has an idea what happens there?
Thanks for your help!
In the attachments, "test" is the main Program!
Solved!
Go to Solution.
Attachments:
SubVI.vi 7 KB
CallSubVI.vi 6 KB
Test.vi 13 KB
You may have misunderstood my earlier comments. The reason your code does not exit is that you are simply reading the value of the stop button in the loop with the event structure. That loop cannot complete until everything in it has completed. That means it is a MUST to check the stop condition after an event has been processed. Doing it outside of the event structure like your code does will mean that the while loop is sitting there waiting for the event structure to complete. This will never happen once you stop you application using the button as currently written. If you hit the stop button and then follow that with pressing the Call subVI button your application will actually stop. In addition, your event structure will not process the Stop button until the subVI (your pop-up) has actually exited. The event containing that call will not complete until the subVI completes.
I have posted a simple modification to your code that includes some of the suggestions I made earlier.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Attachments:
Test-modified.vi 17 KB
Similar Messages
-
Problem calling a EJB Java Client from Java Activity Agent
Hi,
We have a wrapper java class that calls to an EJB through a JNDI lookup. The wrapper class is called from a workflow. The problem is that the call fail with the following message error:
Error : getRemoteHome Lugar: ServiceLocator NamingException Mensaje Error: Receive timed out
Mon Jan 09 15:32:13 EST 2006 Enqueuing VIC/97513 com.tallion.tax.workflow.assessment.Update
F_FN_ERROR (MODULE=com.tallion.tax.workflow.assessment.Update) (ITEMTYPE=VIC) (ITEMKEY=97513) (ACTID=10617) (FUNCMODE=RUN) (ERRMESSAGE=getRemoteHome Lugar: ServiceLocator NamingException Mensaje Erro
The wrapper class has in their classpath a jndi.properties as follows:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=69.0.137.120:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
The call just works fine when we restart the Java Activity Agent and then, after a while it fails again with the same error.
Any ideas/workaround?
Thanks.I have a situation that is a bit similar. I have successfully used beans for storing methods used in JSPs and used by other methods in the same class as was suggested above. Now I would like to break some methods into another (utility) class since they are lower level and can be used by lots of things. They are for database operations (given a String query and String dbname, it queries and returns ResultSet for example). I want to have them in a separate class for reusability and OOP.
I am having problems calling those public static methods in the public class from my bean that communicates with the JSP. I can't compile the class that calls the method in the database ops class. I get an error like :
loginHelper.java:45: cannot find symbol
symbol : variable sqlHelper
location: class dbHelperBean.loginHelper
and when I include the package name in the call I get
loginHelper.java:45: cannot find symbol
symbol : class sqlHelper
location: package dbHelperBean
That's strange since the package of both classes is dbHelperBean and the class is indeed called sqlHelper. I tried to compile it in the same directory as sqlHelper as well. What am I doing wrong?
Thanks for any help. -
Problem calling different versions of BPEL process from an ESB
We are currenlty having a problem calling a BPEL process from an ESB service.
We initially developed the solution and the two communicated correctly, however it was necessary to make some changes to the BPEL process and we subsequently redeployed the BPEL process incrementing the version number.
However the ESB service when initiated was still calling the initial version of the ESB service.
Is there any way of making the ESB call the default BPEL process version as configured from the BPEL console.You can accomplish this task by invoking SOAP Service in ESB that points to current WSDL of BPEL process, for example:
http://localhost:8888/orabpel/default/SOAOrderBooking/SOAOrderBooking?wsdl
instead of
http://localhost:8888/orabpel/default/SOAOrderBooking/1.0/SOAOrderBooking?wsdl
This information is accessible in Metalink Note: 430206.1 -
Hi All!
I'm having some problems calling a Webservice. I've created a deployable proxy and a client bean and from this bean I've generated a Webservice. When I test this Webservice the actual webservice call is succesfull but I get the following response from the Webservice:
HTTP/1.1 200 OK
Connection: close
Date: Fri, 13 May 2005 10:26:37 GMT
Server: Microsoft-IIS/6.0
P3P: CP="NOI DSP COR ADM DEV PSA PSD HIS OTP OUR IND STA"
X-Powered-By: ASP.NET
X-Powered-By: PHP/4.3.9
Status: 200 OK
Server: PEAR-SOAP 0.8.0RC2-devel
Content-Type: text/xml; charset=UTF-8
Content-Length: 1887
X-Zend-WinEnabler: 1.2.0
<br />
<b>Notice</b>: Undefined property: actor in <b>C:Program FilesZendWinEnablerphppearSOAPServer.php</b> on line <b>318</b><br /> <br />
<b>Notice</b>: Undefined property: mustunderstand in <b>C:Program FilesZendWinEnablerphppearSOAPServer.php</b> on line <b>322</b><br />
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ ....etc"
As you can see there is some HTML code in the response. This HTML code causes problems for the SAP parser as it expects a SOAP:Envelope and not some HTML junk.
I've looked up what the properties <i>mustunderstand</i> and <i>actor</i> do in a SOAP header and they seem to be optional properties. On the Webservice side the SOAP parser unfortunately seem to think these properties are mandatory.
There's probably two ways to solve this problem. The first way is to ask the guys who host this Webservice to change it are their side. The other option is to add these properties to the SOAP header on the SAP side....which brings me to my question: Is there any way to add these two properties to the SOAP header before the deployable proxy calls the Webservice?Hi Arnouid,
as far as I understand your post, the HTML code is the body of the response.
If it is so, it is not a correct SOAP-message. A SOAP header is inside of the envelope and not outside of it.
So, it is not very a big surprise, that the parser don't like this.
Aside from the form of a SOAP-message, it is not even a XML-message, which must begin with <?xml...
tom -
Problem calling a certificate authenticate web service
Hi,
I am having some problem trying to connect to a secure web service PI 7.1 Ehp 1. I have a secure web service hosted somewhere and I can call this web service using SOAP UI . However when I load the same pfx certificate in PI via the netweaver administrator and call the web service I got the following error.
<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: iaik.security.ssl.SSLCertificateException: Peer certificate rejected by ChainVerifier</SAP:AdditionalText>
Has anyone done similar thing? Is there anything else I need to do except loading the cert and configure the cert in the comm. channel? Do I have to configure SSL in PI even if I am only calling a web service?
Thanks in advance
WingWe had the same problem calling a web service where the url started with "https". Once we loaded the certificate in NWA and stopped and restarted the communication channel, it worked fine.
The key is to load the certificate before the communication channel is called. Otherwise you will continue to receive the Peer Certificate rejected by ChainVerifier until you restart the communication channel. -
Problem calling simplebutton from library
Hi guys,
I'd like to ask for your assistance. I have a problem calling
SimpleButton from library. I already checked the Linkage:Export for
actionscript but still an error appear "Call to a possibly
undefined method OkBtn". I'm just wondering because this method
works on my MovieClips except for SimpleButtons. Is there another
way to call SimpleButtons?
Here's my code calling MovieClip:
var mc:MovieClip = new ourProduct();
and same in calling my SimpleButton:
var myOkBtn:SimpleButton = new OkBtn();
please help.
Thank you very muchHi again,
Since I could not call my SimpleButton inside the library, I
was thinking of putting my button inside the movieclip and call
that clip inside my library.
On my stage, I called
underConstructionPane() movieclip. This
underConstructionPane contains
myOkBtn which previously I wanted to call but as a work
around, I just put it inside
underConstructionPane movieclip with instance name of
okBtn. I added eventHandler on
okBtn which supposed to call
showHome() function outside
underConstructionPane.
showHome() was declared on the stage or root (I don't know
the correct term. hehehe
sorry.) but I don't know how to call that function.
I tried this:
var home = new showHome();
but it won't work.
Please help me
Thank you. -
Queue returning error while exiting when calling subvi within main vi
Hello
I am having issues with using queues in a project where a subvi is called from main vi. After calling subvi first time, when I press any button labview returns following error.
"LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @ ".
Please find attached the vi and project explorer file. I will appreciate feedback. I am using Labview development suite 2010.
Kind Regards
Austin
Solved!
Go to Solution.
Attachments:
building autocycles project.lvproj 2 KB
building autocycles screen.vi 19 KB
modifying vi.vi 30 KBHello Austin,
It looks like you are releasing your queue in the sub vi when it exits (Force destroy is set to TRUE therefore it destroys the queue, not just the reference to the queue)
I tested this by putting a diagram diable structure around the the release queue vi in the sub vi and it now works without throwing an error.
Set Force destroy to false so that it only destroys a single reference to the queue.
Chris
Don't forget to give Kudo's for a good answer !
LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect -
Problems calling Landlines in France with Skype Un...
Hi all,
I've signed up for the free trial of Skype Unlimited and am having a few problems calling a couple of landlines in France. Both numbers begin +33 (0)9... but are both normal French landlines (at least, calls to them in France are charged the same as any other house phone). So I was wondering if anyone knew why this might be the case?
Thanks in advance for any help/tips!I have also problems with +33 4 numbers and +33 5 numbers.
This is recent and was not the case before. -
Problem calling AS3 class's methods from Flex Project
Sorry if this is a stupid question, but after 2 days of Web
searching and 2 books give up; I am a Java and c# programmer and am
having problems calling AS3 classes (in packages) from Flex Builder
2 Flex Projects; the AS3 classes work great as Flex Builder "AS3
Projects", but when I try to use the classes in a Flex Builder
"Flex Project" I am able to see and set their properties, but
cannot see (through "code completion") their methods (unless the
class extends another AS3 class; and in that case I can see the
base class's methods). Here is the code:
AS3 Example Class:
package asText {
public class CheckWord {
public var strData:String;
public var strAProperty:String;
public var intAProperty:int;
// Constructor
public function CheckWord() {
public function TestMethod():void {
trace("test...");
public function WordLength():int {
var intLength:int = 0;
trace(strData);
intLength = strData.length;
return intLength;
} // From Method WordLength
} // From Class CheckWord
} // From Package asText
The MXML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
width="442" height="488" horizontalAlign="center"
verticalAlign="middle"
backgroundGradientColors="[#c0c0c0, #c0c0c0]"
xmlns:asTheText="asText.*"
>
<asTheText:CheckWord strData="Test words" />
<mx:Panel title="Welcome to ........" width="337"
height="393" horizontalAlign="center" verticalAlign="middle"
layout="absolute" y="15" x="50">
<mx:Text text="First Name" enabled="true" width="68"
fontWeight="bold" x="27.25" y="36"/>
<mx:TextInput id="txtFName" x="112.25" y="34"/>
<mx:Text text="Last Name" enabled="true" width="68"
fontWeight="bold" x="27.25" y="66"/>
<mx:TextInput x="112.25" y="64" id="txtLName"/>
<mx:Text text="email address" enabled="true" width="87"
fontWeight="bold" x="17.25" y="96"/>
<mx:TextInput width="189" id="txtEmail" left="112.25"
top="94"/>
<mx:Button id="butSubmit" label="Submit" x="95" y="194"
click="asTheText:TestMethod();"/>
..............and so on ............
All this does is give me an 1180 error:
1180: Call to a possibly undefined method TestMethod.
flexConveyMovie1.mxmlThanks, I have it working; I was not assigning an "ID" to the
"MXML use of the class" (whatever the formal name for that is;
like: <asTheText:CheckWord id="MyText" strData="The Data" />
) and then I was not referencing that ID in what I am refering to
as calling methods for the Class; like:
<mx:Button id="butTest" label="Test Function" x="39"
y="208" click="MyText.TestMethod();"/>
Also, I did some tests on this, and I am shocked that
apparently neither of these two "uses"(?) of a custom AS3 class
actually "call" the Class's constructor. Does that make sense or is
that the result of how I am structuring this?
Phil -
HT201303 my payment option problem call me 9994270834 & pls speak tamil
my payment option problem call me 9994270834 & pls speak tamil
Hi Stuart.
Thank you for your concern.
I have spoken to Rita (floor manager) who called me back this afternoon.
She looked at the account and could see that there was an open request on there for the call out charges to be removed, and suggested I wait. I explained to her that the Termination deadline of 28th July was looming and I didn't want to default and the account be closed. She understood what I meant and said the only thing I could do was to pay the bill (including the disputed charge). I could see no other way either given the speed of progress up to now so reluctantly agreed to do this. I feel a little bullied into this but the last thing I want is for the account to be closed and have to deal with someone else such as a debt collection company. I have been placed on a monthly payment plan so that I don't have to pay it all at once. which is welcome at least. This has caused me great stress and I feel a lot of it could have been avoided given better service. my complaint number is 52971381317.
Thanks. -
Problem call stored procedure from asp using oo4o
I am having a problem calling a pl/sql stored procedure from ASP.
Attached is the code. Any help would be appreciated. There are no errors returned on the page as far as I can tell.
Sub add_cc_rec(p_location_rental_object_num, p_start_date, p_end_date, p_rate_code, p_quantity)
'On Error Resume Next
Dim msg, stat, p_available, p_free_sell, p_cap_level, p_status_code, p_error_code
Dim OraDatabase, PlSqlStmt
Response.Write "In Function add_cc_rec<br>"
msg = ""
stat = ""
p_available = "Y"
p_free_sell = "Y"
p_cap_level = "0"
p_status_code = 2
p_error_code = ""
Set OraSession = Server.CreateObject("OracleInProcServer.XOraSession")
Response.Write "Created OraSession<br>"
Set OraDatabase = OraSession.OpenDatabase(ORADB, RUUID &"/"& RUPWD, 0)
'Set OraDatabase = OraSession.DbOpenDatabase(ORADB, RUUID &"/"& RUPWD,cint(0))
'Set OraDatabase = OraSession.DbOpenDatabase(ORADB, UID &"/"& PWD,cint(0))
Response.Write "Created OraDatabase with the following parameters<br>"
Response.Write "Database is " & ORADB & "<br>"
Response.Write "UserId is " & RUUID & "<br><br>"
OraDatabase.Parameters.Add "p_location_rental_object_num", p_location_rental_object_num, ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "p_available", p_available, ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "p_start_date", p_start_date, ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "p_end_date", p_end_date, ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "p_free_sell", p_free_sell, ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "p_quantity", p_quantity, ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "p_cap_level", p_cap_level, ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "p_rate_code", p_rate_code, ORAPARM_INPUT, ORATYPE_VARCHAR2
OraDatabase.Parameters.Add "p_status_code", p_status_code, ORAPARM_OUTPUT, ORATYPE_NUMBER
OraDatabase.Parameters.Add "p_error_code", p_error_code, ORAPARM_OUTPUT, ORATYPE_VARCHAR2
Response.Write "Calling PL/SQL procedure cc_insert <br>"
Set PlSqlStmt = OraDatabase.CreateSQL("Begin RATELINK_CAPACITY_CONTROL.cc_insert(:p_location_rental_object_num, :p_available, :p_start_date, :p_end_date, :p_free_sell, :p_quantity, :p_cap_level, :p_rate_code, :p_status_code, :p_error_code); end;", ORASQL_DEFAULT)
Response.Write "PL/SQL procedure cc_insert has been called <br>"
Response.Write "Status code from PL/SQL procedure cc_insert (" & OraDatabase.Parameters("p_status_code").value & ")<br>"
Response.Write "Error code from PL/SQL procedure cc_insert (" & OraDatabase.Parameters("p_error_code").value & ")<br>"
'Response.Write "Error code from PL/SQL procedure cc_insert (" & p_error_code & ")<br>"
OraDatabase.Parameters.Remove "p_location_rental_object_num"
OraDatabase.Parameters.Remove "p_available"
OraDatabase.Parameters.Remove "p_start_date"
OraDatabase.Parameters.Remove "p_end_date"
OraDatabase.Parameters.Remove "p_free_sell"
OraDatabase.Parameters.Remove "p_quantity"
OraDatabase.Parameters.Remove "p_cap_level"
OraDatabase.Parameters.Remove "p_rate_code"
OraDatabase.Parameters.Remove "p_status_code"
OraDatabase.Parameters.Remove "p_error_code"
Set OraSession = Nothing
Set OraDatabase = Nothing
End Sub1 - Can I clear errors on the OraDatabase class. How do
I do that?They store the last error, should clear itself.
2. Is this a client side or server side error? If this
is a client side error, how do I resolve it?Server side error only. Make sure the user you connect as can see 'RATELINK_CAPACITY_CONTROL.CC_INSERT' and has execute permissions on it. You may need to qualify it with a schema name if the connected user is not the schema owner. -
Have problems calling mobiles and landline to and ...
Hey, I have problems calling mobiles and landline to and other contry and i have and active subscrition.can u please help me out?
Hey, I have problems calling mobiles and landline to and other contry and i have and active subscrition.can u please help me out?
-
Problems calling context-sensitive AIRHelp from Adobe Flex App
Hi everyone...
I´m having problems calling context-sesitive AIRHelp from Flex.
I can launch the help from flex using the following code (flex), but allways starts on the default topic.
private function invocarAirHelp(tema:String):void {
var appID:String = "pc1";
var pubID:String = "8C47FDE4638CAF7F210634E52A5F8318D893A57C.1";
var mgr:ProductManager = new ProductManager("airappinstaller");
mgr.launch("-launch " + appID + " " + pubID);
the launch method can recive parameters after the publisherID, but i dont know the parameters that i should give to the method to start the AIRHelp on an specific topic.
I tryed using the parameters as the call was on the command line, ex:
mgr.launch("-launch " + appID + " " + pubID + " -csh mapnumber 12");
but i can get any results... with those parameters the help application doesn´t even start
Anyone have an idea to make this works?
Thanks in advance, SabinHi Sabin,
The only supported way to launch AIR applications from the browser is the air "browser API": http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.html#1035834
The browser API uses ProductManager internally and exposes higher-level browser API so that we change the implementation if necessary someday. The browser API will stay the same, even if the interactions through ProductManager (or something else) change.
The browser API (air.swf) has other features that make it the preferred way to launch apps. For instance, it provides accurate information about which platforms support AIR, and can therefore manage install of new apps and of the runtime itself.
Also, if the application is not installed then Browser API will return Error to the flex application, but that does not happen in case of ProductManager.
That said, you can probably use "--" to separate arguments intended for airappinstaller from arguments that should be passed through to the app itself.
mgr.launch("-launch " + appID + " " + pubID + " -- -csh mapnumber 12");
-Praful Jain -
Problems calling a html form from a different page
Hi,
I'm working on a logon for a website. I have a html page and a jsp page that contains the login function. I want to call the login form after the user presses submit. But I'm having problems calling the form from the html page.
Any help appreciated.
Here is my html page:
<form method="POST" action="login.jsp">
<table>
<tr>
<td>
<div align="center">
<b>UserName:</b>
<input name="user_name" type="text" class="input" id="username" maxlength="18">
<b>Password:</b></font>
<input type="password" name="password" class="input" maxlength="18">
</input>
<input type="button" border="0" value="Login" width="30" height="20">
</input>
My jsp page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body bgcolor = "#E5E8EF">
<script language="javascript">
function login(form) {
alert("hello");
if (form.username.value=="joe") {
if (form.password.value=="bloggs") {
location="success.html"
} else {
alert("Invalid Password")
} else { alert("Invalid UserID")
//-->
</script>
</body>
</html>So your intention is that the JS function would be invoked somehow?
Are you aware that Javascript is a completely different language from Java/JSP/JSTL?
Here is a listing of some JSP/Servlet tutorials which might help you further:
http://www.google.com/search?q=java+tutorial+site:sun.com
http://www.google.com/search?q=jsp+tutorial+site:sun.com
http://www.google.com/search?q=servlet+tutorial+site:sun.com -
Problem about asynchronous call: subVI front panel doesn't pop up when called.
Dear All,
I'm new to LabVIEW, and this is the first time I try to use the asynchronous call.
I'm using LabVIEW 2011.
I want to build a directory for several VIs, and it should allow users to open more than one of the VIs at the same time by pushing the buttons. Before building this directory, I simply tried to use asynchronous call to call a VI form another VI, but found a big problem.
I followed the steps in the help file, created a strictly typed reference, set the option to x80 because I don't need the return. When I run it for the first time, it worked fine: the subVI popped up and run. Then I closed the subVI. But for the sencond time and on, when I run the caller VI, the subVI didn't pop up, instead it seemed to run silently on background because when I manually opened it from the file I found it running. Besides, I didn't find any option like "show front panel when called" of the asynchronous call.
The caller VI and subVI are attached. The address of subVI in caller VI should be changed accordingly.
What should I do to make it work properly? Thanks very much for any idea!
Solved!
Go to Solution.
Attachments:
asynchronous_call.vi 8 KB
boolean.vi 7 KBJeff·Þ·Bohrer wrote:
A better approach is to set the vi properties programaticly like this:
Jeff, you will be happy to know that I used this tactic in full force on a project recently (lots of dialogs in this program). Not sure how many LabVIEW reboots it has saved me from. Reuse VIs made it even easier to do.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Maybe you are looking for
-
External hard drive mac to pc?
My computer is running slow so I purchased an external hard drive to transfer my photos to. Is it possible to open these photos on an PC?
-
Hi All, I have implemented the MB_MIGO_BADI. At the time of Goods Receipt a Custom tab is triggering only for a set of vendors as per my requirement. The problem is, in the Item level Ref. Docu field(MSEG-LFBNR) is blank when ever it's triggers my cu
-
Dear All, When I refer the subcontracting challan in MIGO the system tends to accept all the challans which are not relavent to the purchase order. Kindly help me if any setting is to be made to validate the P.O and the challan number. Help in any fo
-
Hi there, First of all, hi. I used Arch some time ago but never registered in these forums. Then I moved to Slackware, got tired of no automatic pkg dependency and came back to Arch. Home, sweet home. Once I got my fresh installation (plus X and my W
-
Hello all. My friend just sent me an email that puzzles me: "I was just working on something in Word and my screen started going black and it would not let me do anything. It was like the screen was melting. It started getting black at the top and wo