Subvi waiting to run (objective function)
Dear Users,
I have an optimization process using unconstrained nonlinear optimization and an objective function. The only place I use that objective function is in a subVI (let's call it Optimise.vi), where I supply that to the optimization subVI (which is LabVIEW native). After running my whole program, the Optimise.vi stops and is in the idle state. But the objective function and all of its subVIs are in a running state, and their run-arrows display "SubVI waiting to run" or "Run" (always with an arrow inside an arrow). I could check on the state of the two VIs using a VI by Marche at http://forums.ni.com/t5/LabVIEW/SubVI-Waiting-to-Run/td-p/49432.
The execution of the Optimise.vi and the objective function is set to "shared clone". If I set the execution of the Optimise.vi to "non-reentrant", then the objective function also ends in the idle state. But my program runs longer, and I would like to avoid that.
Is this behavior bad? Should I care about it?
Cheers,
Dear ghighuphu,
I really like to help you with your issue but some more informations are necessary.
I assume you use this optimization function:
Constrained Nonlinear Optimization VI
http://zone.ni.com/reference/en-XX/help/371361H-01/gmath/constrained_nonlinear_optimization/
Did you create the objective function from the template located here: labview\vi.lib\gmath\NumericalOptimization\cno_objective function template.vit ?
In the template the execution settings should be right.
For further troubleshooting a screenshot would be nice. Feel free to come back to me.
Kind Regards,
Vanessa
AE Munich
Similar Messages
-
I have written a data acquisition program with LV 6. I have written it so that one part of the program gets data from our NI PCI-MIO-16 type card, and outputs the data to a global array at a frequency of 100 Hz. Other parts of the program then read the data from the global array, apply scale factors, graph, output to disk, etc, as required. All of this seems to work perfectly.
My problem arises as I try to stop my program. I go into either my continuous logging or manual logging sub VI parts of the program, and when I try to come out again the sub VI appears to stop, but it won't go away. The stop button is greyed out. The run arrow is white with a small black arrow inside. When I move the cursor over it the pop up message "SubVI Waiting to Run" a
ppears. The only way to stop the Sub VI is to close the window. I have followed the VI's through using highlighting, and I can't see any problems, any sub VIs still running. If I run the VI independently without coming into it from the calling VI, but still having the other data acquisition VI going as well, it works perfectly and exits fine.
What is the obvious problem that I am overlooking???? Is it a global VI problem? I am only using one Global VI, and it is also passing data between other VIs. Could this be the problem? Should I have a global VI which is the only link between the two VIs, and other globals for links between other VIs?
Please help if you can as I will not have much hair left soon!
Thanks in anticipation
StuHi Stu,
If I Understand Correctly is that you have a Few Vi's Running and when you try to Stop the Program, you want to be able to come out of the Sub Vi Panel. Also you have Described a Complex Situation very briefly so some details are unclear. However, Check these things.
You Wrote "The stop button is greyed out. The run arrow is white with a small black arrow inside. When I move the cursor over it the pop up message "SubVI Waiting to Run" appears."
The Run Button when White With a Black arrow indicates your SubVi is in "Running" State. This means that there is a top Level VI Which is running and has Some Code which will Call this Sub Vi. As soon as a top level Vi is Run, all subvi's called by the top Level Vi go into Running State. You are right, th
e Vi Can Be closed By Close Button. But If you were to Open this VI again You will see the same White and Black Arrow.
What You can do is Use Vi Server Property "Execution State" in A New Vi and run this VI supplying the Path Name of the Problem Vi while you are Having this Problem. I have attached a small Vi Where you can enter the Path Name of Vi you want to Check and run it. It will Give you the state of the VI, Running, Bad, Idle or Top Level. Mind you if your Vi is Not even Open it may give you "Bad"
Now if you get status as running it means it is currently reserved by a top Level Vi for Running.
So to Stop your Program and close the Window you may want to use Vi Server Property nodes to End Execution and Close Fornt Panel.
One Another thing to do to identify the problem is go to "Browse" Button and Look at Vi Hierarchy. Also there is a button "This Vi's Callers". If the Caller Vi Is Open It will show up here. Most Probably Because of Global Variable VI Which is at th
e Top you have a problem.
I Hope this Helps. If you can Post More Details - I am Sure you will get Contextual Help to sort your Problem.
Good Luck!! Baldness can be good Sometimes!!
Good Luck!
Mache
Attachments:
Find_VI_State.vi 26 KB -
How do I get values into a vi from a subvi while the subvi is still running within the vi?
Hello
This is my problem. I have a subvi that runs an experiment. At different point in the experiment different instruments are on or off and I have a boolean array display this info. It is updated at various points of the experiment via a local variable. That works fine. Here is the problem though. I run that subvi from a main vi program (that runs it several times for several experiment cycles). I would like to pass the status of that array onto the mainvi to display there too. The problem is that the array in the main vi is not updated until the subvi is done running and thus displays only the array status at end of experiment (instead of changing
as the status changes within the subvi). I tried using a global variable to write to it in the subvi every time there is an update, and read from it in the mainvi, but that doesn't work, it still displays just the status at the end of the subvi execution. Does anyone know how to make this work, or if there is a workaround this? Thanks.If you have LabVIEW 6i, you can update indicators of a calling VI from
a SubVI, while the subVI is running.
In your case you need
1) an indicator on the main VI panel to display the boolean array
2) to pass a reference to that indicator to the subvi when you call it
3) to use this reference in the subVI, connect a property node to it and
write the values to be displayed to the 'value' property of this node
If you don't have version 6, you can write the values to be displayed to
a global and display this global in the main VI from within a while loop
which must run in the main VI in parallel to the running subVI.
It's more complicated, since you need a mechanism to gracefully shut
down the while loop after subVI finishes. You could do this with
another global control boolean which is not displayed but just connected
to the repeat terminal of the while loop. Don't forget to put a 'Wait' of,
say, 50...100 msec in that while loop.
-Franz
zkajan schrieb:
> Hello
> This is my problem. I have a subvi that runs an experiment. At
> different point in the experiment different instruments are on or off
> and I have a boolean array display this info. It is updated at
> various points of the experiment via a local variable. That works
> fine. Here is the problem though. I run that subvi from a main vi
> program (that runs it several times for several experiment cycles). I
> would like to pass the status of that array onto the mainvi to display
> there too. The problem is that the array in the main vi is not
> updated until the subvi is done running and thus displays only the
> array status at end of experiment (instead of changing as the status
> changes within the subvi). I tried using a global variable to write
> to it in the subvi every time there is an update, and read from it in
> the mainvi, but that doesn't work, it still displays just the status
> at the end of the subvi execution. Does anyone know how to make this
> work, or if there is a workaround this? Thanks.
Franz Josef Ahlers
Section Semiconductor Devices
Physikalisch-Technische Bundesanstalt
Bundesallee 100
D-38116 Braunschweig
phone: (+49) 531 592 2410
fax: (+49) 531 592 2405 -
Patch 9239090 - ORA-04021: timeout occurred while waiting to lock object
Hello Guys,
I need help urgently to comlete an upgrade of ebs 12.1.1 to 12.1.3.
We are upgrading ebs 11i to 12i going live this weekend. We have encountered "ORA-04021: timeout occurred while waiting to lock object" on patch 9239090 with two Workers:
In adctrl:
1 Run AutoPatch R120 AFUTLGRS.pls FAILED
2 Run AutoPatch R120 AFUTLOGS.pls FAILED
sqlplus -s APPS/***** @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
Connected.
create or replace package wf_bes_cleanup AUTHID CURRENT_USER as
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object
I have done everything everything imaginable but cannot get pass these 2 failed workers.
1) I have checked are there are no locks blocking on any objects:
select s1.username || '@' || s1.machine
|| ' ( SID=' || s1.sid || ' ) is blocking '
|| s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status
from v$lock l1, v$session s1, v$lock l2, v$session s2
where s1.sid=l1.sid and s2.sid=l2.sid
and l1.BLOCK=1 and l2.request > 0
and l1.id1 = l2.id1
and l2.id2 = l2.id2 ;
2) I also checked and there is space in the database.
3) From adctrl, I have tried restarting the jobs one by one but the worker 1 hangs at and eventually fails on several (12) attempts.
4) The solution on Doc ID 1291064.1 is not the problem:
SQL> select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI, FORCE_LOGGING
from v$database;
SUPPLEME SUP SUP FOR
NO NO NO NO
5) Manual execution still gave ORA-04021:
sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql
6) The alert log has no related errors
7) I Finally, after over 6 hours of waiting, I could only get the patch to continue after by using adctrl option 8 to skip these two workers.
After proceeding, I have yet hit two more errors and now stuck:
I have hit another error with the same patch:
create or replace package body FND_LOG as
/* $Header: AFUTLOGB.pls 120 ...
AD Worker error:
ORA-04021: timeout occurred while waiting to lock object
Unable to process file in PACKAGE mode.
Not converting file for Invoker's Rights because it appears to be a package body creation script (based on the filename).
File is: /u02/applfinp/apps/apps_st/appl/fnd/12.0.0/patch/115/sql/AFUTLOGB.pls
AD Worker warning:
Product Data File
/u02/applfinp/apps/apps_st/appl/admin/xniprod.txt
does not exist for product "xni".
This product is registered in the database but the above file does not exist in APPL_TOP. The product will be ignored without error
AD Worker error:
The following ORACLE error:
ORA-04063: package body "APPS.FND_LOG" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APPS.FND_LOG"
ORA-06512: at "APPS.FND_FUNCTION", line 834
ORA-06512: at "APPS.FND_MENU_ENTRIES_C_DELTRG", line 4
ORA-04088: error during execution of trigger 'APPS.FND_MENU_ENTRIES_C_DELTRG'
Can I stop and restart this patch 9239090?Hello,
I later executed the failed jobs or scripts manually (successfully) for the patch to continue
sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql
The patch ended with the following :
The following Oracle Reports objects did not generate successfully:
ap reports/US APXARATE.rdf
ar reports/US ARXCTA.rdf
fa reports/US FASRSVED.rdf
ont reports/US OEXOEORD.rdf
pa reports/US PAXACMPT.rdf
pa reports/US PAXALRUN.rdf
pa reports/US PAXACRPT.rdf
pa reports/US PAXCPGAL.rdf
pa reports/US PAXPCRFD.rdf
The patch execution ended but the patch number is not record in apps.ad_bugs table:
select TO_CHAR(CREATION_DATE,'dd-Mon-yyyy, hh24:mm:ss'), BUG_NUMBER from apps.ad_bugs where bug_number in ('9239090');
no rows selected
JFI
Patches located in ad_applied_patches to which there is no a corresponding record in ad_bugs:
SQL> SELECT a.patch_name, TO_CHAR(max(a.last_update_date),'dd-Mon-yyyy, hh24:mm:ss')
2 FROM applsys.ad_applied_patches a
3 WHERE NOT EXISTS (SELECT '1'
4 FROM ad_bugs b
5 WHERE b.bug_number = a.patch_name)
6 group by a.patch_name;
PATCH_NAME TO_CHAR(MAX(A.LAST_UP
9239090 26-Oct-2013, 00:10:27
AutoConfig 25-Oct-2013, 17:10:51
merger9179588 25-Oct-2013, 11:10:30
merger_post_5903765 27-Apr-2013, 23:04:45
mergeu6678700 25-Oct-2013, 16:10:09
What could have happened that this was not recorded in ad_bugs?
How to I get this recorded in the ad_bugs table?
Thanks
Mathias -
Service For Objects functionality (SDV transaction)
Hello experts,
Some users are getting an authorization error while trying to display an image from t-code FBL1N (services for objects). After identifying the reason of this issue with NSU53, the simple fix is to provide access to the user to transaction SDV. Actually, we are proposing to the security team to provide the access in a Generic role, so all user can get the access.
Their concern is that if for any reason, any of the users runs the t-code directly (SDV), and not through the Services for Objects funtionality, they might be able to access other documents that they should not be allowed. To be honest, I haven't seen this as an issue before in my 13 years working with SAP.
The question for you guys is: what is the best approach to grant access to users from different modules to Services for Objects functionality without violating security policies?
Thanks,
Alfredoown
-
How to configure objective function for use in minimizati​on?
Hi all,
I have been working on a minimization problem (for details, see this post). I have figured out how to run an unconstrained minimization, but can't quite figure out why my objective function wire remains broken. Here is a screen shot:
Any ideas?
I include below this example main VI, a subroutine that does the minimization, and a subroutine that gets called during the minimization. As it seems I am limited to 3 attachments, I will add some sample data to the first reply that I will generate.
Many thanks,
RipRock
Solved!
Go to Solution.
Attachments:
ExampleCode2.vi 15 KB
Function2Min.vi 11 KB
DashPotCorr1a.vi 72 KBBasically all I did wrong was I created my own function to minimize from scratch. The help very clearly says to copy the template and use that. Here is the function copied into the LV provided template.
All the best,
RipRock
Attachments:
Function2Min.vit 36 KB -
Cannot get a connection, pool error Timeout waiting for idle object
my connection pool setting is
maxActive="3" minIdle="2" maxWait="10000" removeAbandoed="true" logAbandoned="true" removeAbandonedTimeout="30" autoreconnection="true"
we have 7 people hitting the group of search functions ,
about 3 minutes I get
I got error like
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at Deferment.showResult.checStudent(showResult.java:135) at Deferment.showResult.doPost(showResult.java:99) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402) at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
I just wonder
1) Cannot get a connection, pool error Timeout waiting for idle object-> cause by connection pool leaking or other problem.
2) Setting the maxactive to -1 ( suggestion from Google) , if I set my connection to ulimit , waht should I put on minIdle="2"
3) How can I test my connection pool have problem or not ? is
SHOW PROCESSLIST; tolding me someinformation? I use Mysql
Thank you!I try something like ps2 = conn.prepareStatement(target);
ps2.setString(1, UNumber); // set input parameter
rs = ps2.executeQuery();
sendMail = 0;//how many rows we can find.
while (rs.next()) {
sendMail++;
ps2.close();
rs.close();
conn.close();
if ((count1 == 0) || (count2 == 0)) {
conn.rollback();
} else {
conn.commit();
conn.setAutoCommit(true);
ps.close();
calstat2.close();
conn.close();
calstat = (CallableStatement) conn.prepareCall("{call findStudent}");
calstat.executeQuery();
calstat.close();
conn.close();is that enought? what else I should do to make sure I did close all the connection, after I use it ?
thank you -
Hi,
can anyone tell me how to run this functions while generating reports for labels.
please i need some guidance.
create or replace function get_label_nextval(p_label varchar2) return integer
is
l_last_num integer;
cursor c_label is
select last_num from label_id where label = upper(trim(p_label)) for update wait 10;
pragma autonomous_transaction;
begin
open c_label;
fetch c_label into l_last_num;
if l_last_num is not null then
l_last_num := l_last_num + 1;
update label_id set last_num = l_last_num where current of c_label;
commit;
end if;
close c_label;
return l_last_num;
end;
Thanks and RegardsORA-06519: active autonomous transaction detected and rolled back
Cause: Before returning from an autonomous PL/SQL block, all autonomous transactions started within the block must be completed (either committed or rolled back). If not, the active autonomous transaction is implicitly rolled back and this error is raised.
Action: Ensure that before returning from an autonomous PL/SQL block, any active autonomous transactions are explicitly committed or rolled back.
http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/e4100.htm#sthref2110
I think your COMMIT should be moved outside your IF.
Commit just before your RETURN, after your CLOSE CURSOR statement.
Edited by: hoek on Jan 4, 2010 1:28 PM typo -
Question about the Wait Until Next ms Function
Hello,
I met a problem when I tried to use wait until next ms function to control the period of the loop.
I use Labview2009 now. I wrote a VI to sample the current values at 100Hz and then store the samples in a text file. The currents are sampled once in a loop and then wait for next 10ms to begin the next loop. After 360,000 loops (should be an hour), it will creat a new file to store the new samples in the following an hour.
I left the VI runs on CompactRio for the whole weekend. The result I got is shown in the picture below:
24 files should be created in one day. While there were only 3 files created in the firest 24 hours ( from Fri 16:00 - Sat 16:00). And after that it worked very well.
When I checked the first three files (created from Fri 16:00 - Sat 16:00), I found that it didn't sample at 10Hz. It sampled at the frequency of about 20Hz (sometimes 18Hz, sometimes 19Hz).
I am confused by the problem a lot. What may cause it didn't work in the first 24 hours and worked after 24 hours? And How could I fix this problem?
Thank you very much!You need to show us some code!
This cannot happen in a single loop, but can easily happen if you have e.g. stacked loops or sequences containing multiple wait statements.
Also have a look at these old threads:
Synchronization problems during measurements (using while loop)
accurate timing between events
If accurate timing is important, use a timed loop. Your incorrect times are faster, so I don't think there is a problem with the inner code taking too long.
LabVIEW Champion . Do more with less code and in less time . -
Run a function in flash when click a button on HTML page
dear friends,
i have loaded my swf in an html/ aspx page. when i click a button in html page, i want to pause my swf movie. Actually swf has another movie clip i want to stop that. any option pls help me. possible send me some sample coadings.. i tried with externalInterface but no result..
or if i click a button in html page, i want to run a function existing in loaded swf....
thanks in advance...
Thanks and Regards,
Syed Abdul RahimDear Mr.ned,
Greetings! i tried to put the id also, still its not working.. any ideas? find below my codings:
flash code:
import flash.external.ExternalInterface;
ExternalInterface.addCallback("methodName", method );
function method() {
mytxt.text = "call from java script";
trace("called from javascript");
HTML code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jscr_rd</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#ffffff">
<p>
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
<p align="left"></p>
-->
<!-- saved from url=(0013)about:internet -->
</script>
<script language="javascript" type="text" >
function methodName() {
jscr_rd.method();
window.alert("hi.. u clicked me?");
</script>
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','widt h','550','height','400','id','jscr_rd','align','middle','src','jscr_rd','quality','high',' bgcolor','#ffffff','name','jscr_rd','allowscriptaccess','sameDomain','allowfullscreen','fa lse','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','jscr_rd' ); //end AC code
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="jscr_rd" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="jscr_rd.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="jscr_rd.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="jscr_rd" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</p>
<form name="form1" method="post" action="">
<input name="but" type="button" value="click me" onClick="methodName()">
</form>
<p> </p>
</body>
</html>
pls check advice me
Thanks and Regards,
Syed Abdul Rahim -
Ora-04021: timeout occured while waiting to lock object.
I have upgraded the DB From 8.1.5 to 8.1.7 then 9.0.2
but while converting to 9i it gave a warning that
"some uncompiled objects were found".
now the DB works fine with every DDL and DML operation but when I edit any precedure or function it hangs for 4 to 5 mins and then show the following error
ora-04021: timeout occured while waiting to lock object.
when I shutdown the DB and restarts it then it allowes me to edit any founction or procedure or package only for one time,then again shows the error when I try to edit second time.
what my be the reason , can any body help me pl.
thankx in advance.If you have oracle metalink support, then, read Note:169139.1. If not, give me your email id, i will send you the note.
SJH -
Object function(){} has no method 'isElementatached toDocumentBody'
Hi,
obiapps 7963
obiee 11115
server linux and client windows7
i had configured ebs with obiee
when i open dashboard it shows 1st page data(tables and graphs) when i select 2nd page(tab) there is no change only first page displays
and when i select prompt it displays below error
Object function(){} has no method 'isElementatached toDocumentBody' on popup window
any suggestion plzzI was contacted by Adobe regarding my error and I was informed that I was running two differen versions of jQuery at the same time which is a no, no. jQuery does not like to have multiple versions loaded at the same time, but if you needed to you could always run one after another, but it would take longer for the page to load. In my case I changed the embeded code in my lightbox under the "Join Our Mailing List". The embeded code uses jQuery version 1.4.4 while the jQuery version that Muse uses is version 1.8.3. To resolve this problem I simply change the 1.4.4 to being 1.8.3. While jQuery is not always backwards compatible, I was lucky on this item as it appears to be backwards compatiable.
I would also like to note that I had originally placed my CSS for this code inline with the coding, but I then removed it and placed it in the head as this helped with some of the problems as well. It is always better to create seperate CSS and .js files and then have your code reference these files. I will work on this in the coming days.
-John -
Error in running a function to convert coordinates in degrees to decimal for EXCEL VBA
For your information, I have 3 cross-posts regarding this question - and all I can said there is still no firm solution regarding this error.
1) http://stackoverflow.com/questions/27634586/error-in-running-a-function-to-convert-coordinates-in-degrees-to-decimal-for-exc/27637367#27637367
2) http://www.mrexcel.com/forum/excel-questions/826099-error-running-function-convert-coordinates-degrees-decimal-excel-visual-basic-applications.html#post4030377
3) http://www.excelguru.ca/forums/showthread.php?3909-Error-in-running-a-function-to-convert-coordinates-in-degrees-to-decimal-for-EXCEL-VB&p=16507#post16507
and the story of the error is as below:
Currently I am working on VBA excel to create a widget to verify coordinates whether it lies under the radius of ANOTHER predefined and pre-specified sets of coordinates.
In the module, I want to convert the coordinates from degrees to decimal before doing the calculation - as the formula of the calculation only allow the decimal form of coordinates.
However, each and every time I want to run the macros this error (Run-time error '5', invalid procedure call or argument) will appear. Then, the debug button will bring me to below line of coding:
degrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1))
For your information, the full function is as below:
Function Convert_Decimal(Degree_Deg As String) As Double
'source: http://support.microsoft.com/kb/213449
Dim degrees As Double
Dim minutes As Double
Dim seconds As Double
Degree_Deg = Replace(Degree_Deg, "~", "°")
degrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1))
minutes = Val(Mid(Degree_Deg, InStr(1, Degree_Deg, "°") + 2, _
InStr(1, Degree_Deg, "'") - InStr(1, Degree_Deg, "°") - 2)) / 60
seconds = Val(Mid(Degree_Deg, InStr(1, Degree_Deg, "'") + _
2, Len(Degree_Deg) - InStr(1, Degree_Deg, "'") - 2)) / 3600
Convert_Decimal = degrees + minutes + seconds
End Function
Thank you.
Your kind assistance and attention in this matter are highly appreciated.
Regards,
Nina.You didn't give an example of your input string but try the following
Sub test()
Dim s As String
s = "180° 30' 30.5""""" ' double quote for seconds
Debug.Print Deg2Dec(s) ' 180.508472222222
End Sub
Function Deg2Dec(sAngle As String) As Double
Dim mid1 As Long
Dim mid2 As Long
Dim degrees As Long
Dim minutes As Long
Dim seconds As Double ' or Long if only integer seconds
sAngle = Replace(sAngle, " ", "")
mid1 = InStr(sAngle, "°")
mid2 = InStr(sAngle, "'")
degrees = CLng(Left$(sAngle, mid1 - 1))
minutes = CLng(Mid$(sAngle, mid1 + 1, mid2 - mid1 - 1))
seconds = Val(Mid$(sAngle, mid2 + 1, 10)) ' change 10 to 2 if only integer seconds
Deg2Dec = degrees + minutes / 60 + seconds / 3600
End Function
As written the function assumes values for each of deg/min/sec are included with unit indicators as given. Adapt for your needs.
In passing, for any work with trig functions you will probably need to convert the degrees to radians. -
Workbook not refresh after running Planning Function (BI-IP)
Hi! Folks,
I have a problem with the Bex Analyser which not refresh the data after running Planning Function.
Step 1: Run Planning Function (There are some changes in records)
Step 2: I have to Run Process Variables again and input the same selection in the pop-up variables
Step 3: The changed records will be shown...
Can I have some coding in the Layouts of Bex Analyzer to refresh the data after running Planning Function?
Brgds,
SupasakeHi,
I had a similar problem that the resuls of my planning function were not automatically shown. Only if I did "something else" like saving or running another function the results were displayed.
I think I solved it by upgrading my SAP GUI6.4 with patch 14. the results of planning functions should be automatically displayed.
D -
I have an app called Astrogold that crashes when I run one function, but no one else I know with the same app experiences the crash. The app writes several different reports, and gives the option of sending them as PDF files. All the other reports generate fine, but one of them....and that one crashes the app while it is trying to generate the report.
Note: it only crashes the display. If I double click the home button I see the app itself is still running.
I checked my Diagnostics & Usage data, and noticed that every time the app crashes a LowMemory report is created. I looked at the LowMemory report and see that the Largest process is Astrogold. But I don't see any reports with the name of the app itself.
I have an iPhone 5c, and according to iTunes I have 2.25 GB Free.
Below is the actual LowMemory report. Can anyone make any suggestions?
name":"astrogold","bug_type":"109","os_version":"iPhone OS 7.1.2 (11D257)","bundleID":"com.esotech.astrogold","version":"4.2.4 (4.2)","app_name":"astrogold"}
Incident Identifier: 257B47E8-3A4D-4C64-8E9F-71D33C905548
CrashReporter Key: cfa389285f4559a21d797bfeec6a78c584e798d6
Hardware Model: iPhone5,4
Process: astrogold [18906]
Path: /var/mobile/Applications/D8301675-652C-4472-A168-CF3F141C5F58/astrogold.app/ast rogold
Identifier: com.esotech.astrogold
Version: 4.2.4 (4.2)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-08-31 13:15:13.616 +0800
OS Version: iOS 7.1.2 (11D257)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x399a51f0 0x39992000 + 78320
1 libsystem_pthread.dylib 0x39a0d7b2 0x39a0a000 + 14258
2 libsystem_c.dylib 0x39955ff4 0x3990c000 + 303092
3 libsystem_malloc.dylib 0x399ccd20 0x399ca000 + 11552
4 libobjc.A.dylib 0x393f73a4 0x393ed000 + 41892
5 libobjc.A.dylib 0x393ffb66 0x393ed000 + 76646
6 astrogold 0x001be574 0xe2000 + 902516
7 astrogold 0x001be774 0xe2000 + 903028
8 astrogold 0x001a2910 0xe2000 + 788752
9 astrogold 0x001a40fa 0xe2000 + 794874
10 UIKit 0x315ba174 0x3147c000 + 1302900
11 UIKit 0x315613d6 0x3147c000 + 938966
12 UIKit 0x31560c2c 0x3147c000 + 937004
13 UIKit 0x314872e0 0x3147c000 + 45792
14 QuartzCore 0x31103316 0x310f7000 + 49942
15 QuartzCore 0x310feb3a 0x310f7000 + 31546
16 QuartzCore 0x310fe9cc 0x310f7000 + 31180
17 QuartzCore 0x310fe3e0 0x310f7000 + 29664
18 QuartzCore 0x310fe1f2 0x310f7000 + 29170
19 QuartzCore 0x310f7f18 0x310f7000 + 3864
20 CoreFoundation 0x2ec20ff6 0x2eb81000 + 655350
21 CoreFoundation 0x2ec1e982 0x2eb81000 + 645506
22 CoreFoundation 0x2ec1ecce 0x2eb81000 + 646350
23 CoreFoundation 0x2eb89724 0x2eb81000 + 34596
24 CoreFoundation 0x2eb89506 0x2eb81000 + 34054
25 GraphicsServices 0x33af86ce 0x33aef000 + 38606
26 UIKit 0x314ea86c 0x3147c000 + 452716
27 astrogold 0x000e9136 0xe2000 + 28982
28 libdyld.dylib 0x398eeab4 0x398ed000 + 6836
Thread 1:
0 libsystem_kernel.dylib 0x39992804 0x39992000 + 2052
1 libdispatch.dylib 0x398e1050 0x398d9000 + 32848
2 libdispatch.dylib 0x398db2de 0x398d9000 + 8926
Thread 2:
0 libsystem_kernel.dylib 0x39992a50 0x39992000 + 2640
1 libsystem_kernel.dylib 0x39992848 0x39992000 + 2120
2 CoreFoundation 0x2ec205e4 0x2eb81000 + 652772
3 CoreFoundation 0x2ec1ed04 0x2eb81000 + 646404
4 CoreFoundation 0x2eb89724 0x2eb81000 + 34596
5 CoreFoundation 0x2eb89506 0x2eb81000 + 34054
6 Foundation 0x2f57d492 0x2f572000 + 46226
7 Foundation 0x2f5ce254 0x2f572000 + 377428
8 astrogold 0x00408f30 0xe2000 + 3305264
9 Foundation 0x2f63fa0a 0x2f572000 + 842250
10 libsystem_pthread.dylib 0x39a0c956 0x39a0a000 + 10582
11 libsystem_pthread.dylib 0x39a0c8c6 0x39a0a000 + 10438
12 libsystem_pthread.dylib 0x39a0aae4 0x39a0a000 + 2788
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x39992a50 0x39992000 + 2640
1 libsystem_kernel.dylib 0x39992848 0x39992000 + 2120
2 CoreFoundation 0x2ec205e4 0x2eb81000 + 652772
3 CoreFoundation 0x2ec1ed04 0x2eb81000 + 646404
4 CoreFoundation 0x2eb89724 0x2eb81000 + 34596
5 CoreFoundation 0x2eb89506 0x2eb81000 + 34054
6 Foundation 0x2f5ca23c 0x2f572000 + 361020
7 Foundation 0x2f63fa0a 0x2f572000 + 842250
8 libsystem_pthread.dylib 0x39a0c956 0x39a0a000 + 10582
9 libsystem_pthread.dylib 0x39a0c8c6 0x39a0a000 + 10438
10 libsystem_pthread.dylib 0x39a0aae4 0x39a0a000 + 2788
Thread 4 name: com.apple.CFSocket.private
Thread 4:
0 libsystem_kernel.dylib 0x399a5434 0x39992000 + 78900
1 CoreFoundation 0x2ec244de 0x2eb81000 + 668894
2 libsystem_pthread.dylib 0x39a0c956 0x39a0a000 + 10582
3 libsystem_pthread.dylib 0x39a0c8c6 0x39a0a000 + 10438
4 libsystem_pthread.dylib 0x39a0aae4 0x39a0a000 + 2788
Thread 5:
0 libsystem_kernel.dylib 0x399a5c70 0x39992000 + 81008
1 libsystem_pthread.dylib 0x39a0ac1e 0x39a0a000 + 3102
2 libsystem_pthread.dylib 0x39a0aad8 0x39a0a000 + 2776
Thread 6:
0 libsystem_platform.dylib 0x39a069a6 0x39a05000 + 6566
1 libobjc.A.dylib 0x393ffad6 0x393ed000 + 76502
2 CoreFoundation 0x2eb86140 0x2eb81000 + 20800
3 CoreFoundation 0x2eb8c0dc 0x2eb81000 + 45276
4 CoreFoundation 0x2eb9f6e4 0x2eb81000 + 124644
5 astrogold 0x0019ed06 0xe2000 + 773382
6 Foundation 0x2f59a64c 0x2f572000 + 165452
7 Foundation 0x2f58a870 0x2f572000 + 100464
8 Foundation 0x2f62e740 0x2f572000 + 771904
9 libdispatch.dylib 0x398de25a 0x398d9000 + 21082
10 libdispatch.dylib 0x398df684 0x398d9000 + 26244
11 libdispatch.dylib 0x398df8d8 0x398d9000 + 26840
12 libsystem_pthread.dylib 0x39a0ac14 0x39a0a000 + 3092
13 libsystem_pthread.dylib 0x39a0aad8 0x39a0a000 + 2776
Thread 7:
0 libsystem_kernel.dylib 0x399a5c70 0x39992000 + 81008
1 libsystem_pthread.dylib 0x39a0ac1e 0x39a0a000 + 3102
2 libsystem_pthread.dylib 0x39a0aad8 0x39a0a000 + 2776
Thread 8:
0 libsystem_kernel.dylib 0x39992a50 0x39992000 + 2640
1 libsystem_kernel.dylib 0x39992848 0x39992000 + 2120
2 CoreFoundation 0x2ec205e4 0x2eb81000 + 652772
3 CoreFoundation 0x2ec1ed04 0x2eb81000 + 646404
4 CoreFoundation 0x2eb89724 0x2eb81000 + 34596
5 CoreFoundation 0x2ebcd346 0x2eb81000 + 312134
6 CoreMotion 0x2f2484fc 0x2f20f000 + 234748
7 libsystem_pthread.dylib 0x39a0c956 0x39a0a000 + 10582
8 libsystem_pthread.dylib 0x39a0c8c6 0x39a0a000 + 10438
9 libsystem_pthread.dylib 0x39a0aae4 0x39a0a000 + 2788
Thread 9 name: WebThread
Thread 9:
0 libsystem_kernel.dylib 0x39992a50 0x39992000 + 2640
1 libsystem_kernel.dylib 0x39992848 0x39992000 + 2120
2 CoreFoundation 0x2ec205e4 0x2eb81000 + 652772
3 CoreFoundation 0x2ec1ed04 0x2eb81000 + 646404
4 CoreFoundation 0x2eb89724 0x2eb81000 + 34596
5 CoreFoundation 0x2eb89506 0x2eb81000 + 34054
6 WebCore 0x36ebfc70 0x36e01000 + 781424
7 libsystem_pthread.dylib 0x39a0c956 0x39a0a000 + 10582
8 libsystem_pthread.dylib 0x39a0c8c6 0x39a0a000 + 10438
9 libsystem_pthread.dylib 0x39a0aae4 0x39a0a000 + 2788
Thread 10 name: JavaScriptCore::BlockFree
Thread 10:
0 libsystem_kernel.dylib 0x399a4f2c 0x39992000 + 77612
1 libsystem_pthread.dylib 0x39a0bf62 0x39a0a000 + 8034
2 libsystem_pthread.dylib 0x39a0cd9c 0x39a0a000 + 11676
3 JavaScriptCore 0x2fbb8308 0x2fba6000 + 74504
4 JavaScriptCore 0x2fbb5970 0x2fba6000 + 63856
5 libsystem_pthread.dylib 0x39a0c956 0x39a0a000 + 10582
6 libsystem_pthread.dylib 0x39a0c8c6 0x39a0a000 + 10438
7 libsystem_pthread.dylib 0x39a0aae4 0x39a0a000 + 2788
Thread 11 name: JavaScriptCore::Marking
Thread 11:
0 libsystem_kernel.dylib 0x399a4f2c 0x39992000 + 77612
1 libsystem_pthread.dylib 0x39a0bf62 0x39a0a000 + 8034
2 libsystem_pthread.dylib 0x39a0cd9c 0x39a0a000 + 11676
3 JavaScriptCore 0x2fd56cb2 0x2fba6000 + 1772722
4 JavaScriptCore 0x2fd56d0c 0x2fba6000 + 1772812
5 JavaScriptCore 0x2fbb5970 0x2fba6000 + 63856
6 libsystem_pthread.dylib 0x39a0c956 0x39a0a000 + 10582
7 libsystem_pthread.dylib 0x39a0c8c6 0x39a0a000 + 10438
8 libsystem_pthread.dylib 0x39a0aae4 0x39a0a000 + 2788
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x27d1f553
r4: 0x00000006 r5: 0x3b90118c r6: 0x0000000b r7: 0x27d1f5bc
r8: 0x0000000b r9: 0x00000001 r10: 0x00626000 r11: 0x00000000
ip: 0x00000148 sp: 0x27d1f5b0 lr: 0x39a0d7b7 pc: 0x399a51f0
cpsr: 0x00000010
Zane B Stein
("os_version":"iPhone OS 7.1.2 (11D257)","version":"104","bug_type":"198"}
Incident Identifier: 3526E805-4C03-4956-83B6-2A4AB95B9EE4
CrashReporter Key: cfa389285f4559a21d797bfeec6a78c584e798d6
Hardware Model: iPhone5,4
OS Version: iPhone OS 7.1.2 (11D257)
Kernel Version: Darwin Kernel Version 14.0.0: Thu May 15 23:10:37 PDT 2014; root:xnu-2423.10.71~1/RELEASE_ARM_S5L8950X
Date: 2014-09-02 14:24:12 +0800
Time since snapshot: 220 ms
Free pages: 1448
Active pages: 17896
Inactive pages: 9268
Speculative pages: 11
Throttled pages: 209561
Purgeable pages: 261
Wired pages: 21682
File-backed pages: 26187
Anonymous pages: 988
Compressions: 456385
Decompressions: 85356
Compressor Size: 44
Uncompressed Pages in Compressor: 59
Largest process: astrogold
Processes
Name <UUID> rpages recent_max fds [reason] (state)
CloudKeychainPro <b9fbb8e4989732709cb18c481dfa61a9> 108 108 200 (daemon) (idle)
mediaremoted <051ef8b6e7c93fa49a0a2e15ea6e1f52> 193 193 200 (daemon) (idle)
MobileGestaltHel <c3c9c32948fe364f8103dd528164b610> 123 123 200 (daemon) (idle)
DuetLST <89027d811bd73931a4d45f71c9bbebc7> 472 472 200 (daemon) (idle)
itunesstored <00f47fa85c623cee9d55c9b004ba561d> 1426 1426 200 (daemon) (idle)
lsd <8d2569b7b89033328609c73d07410b55> 149 149 200 (daemon) (idle)
sandboxd <712c543459bf3d81b0ec88bba199d802> 96 96 200 (daemon) (idle)
geod <6e5e9ae33f8638b7be848eac2c1ef70b> 166 166 200 (daemon) (idle)
assetsd <6f28405c4c1b35e9aff946c1c4799c0f> 868 868 200 (daemon) (idle)
installd <185a1eaa735b3aa38d98092ba8493ba0> 201 201 200 (daemon) (idle)
securityd <47657a3a48573d6a8e52ef4cc868248c> 617 617 200 (daemon) (idle)
networkd_privile <234d3717143e3bbba12acc5de334deaf> 81 81 200 (daemon) (idle)
accountsd <5a5640b47fe637bebb6254deff26eaee> 438 438 200 (daemon) (idle)
routined <d5590a1879153ed284886271907ea8fa> 344 344 200 (daemon) (idle)
EscrowSecurityAl <d0a689490be631efac2c764fe93300dc> 166 166 200 (daemon)
mstreamd <a2bb6401f1d63c7aa320a817d8839522> 406 406 200 (daemon)
tccd <ad9819a843e93a1680335febb52c7cc3> 227 227 200 (daemon)
kbd <eba296f6bd4938688fa16a5e39fa477c> 2319 2319 200 (daemon)
CVMServer <c95a902a5ae331c2a5239b6cf98a0617> 89 89 200 (daemon)
astrogold <58c53f7c8e8931ec823713195426f59c> 166401 166401 200 [per-process-limit] (frontmost) (resume)
identityservices <d1b907f8a41e3ebd9f270aa846040b07> 581 581 100 (daemon)
wifid <2b4c0ddf1a8439838868bf2be61d8bf1> 1286 1286 25 (daemon)
syslogd <5c06b8eec36032b49cc9421348ba47ea> 132 132 50 (daemon)
locationd <b813efaa4a6a314cafdbbd9b88c30796> 1732 1732 100 (daemon)
powerd <bd077d109d773bcd9041153b30ea034a> 128 129 100 (daemon)
imagent <79bd0fedda583ae3822051093f7681b5> 571 571 100 (daemon)
vmd <f44f0a6a37293606865eb8862c10b653> 188 188 100 (daemon)
iaptransportd <818588012ed93eb7a10ccb22d8acadfe> 223 223 50 (daemon)
mediaserverd <e40c7476d9fe3d759bfd28b8d68dc7ba> 2233 2233 200 (daemon)
mDNSResponder <60e905f9582a3090ab6e7a257454389e> 226 226 100 (daemon)
apsd <b7e19d27180e34aba845e475eae7d3db> 510 510 100 (daemon)
dataaccessd <fdf81960fb903bd68616117fd29ce277> 2563 2563 200 (daemon)
sharingd <2c731a1c182637a39b004694b2a5e23d> 508 508 50 (daemon)
mobileassetd <08440fa17b3537afb347cf78aa039a67> 565 565 200 (daemon)
SpringBoard <f73e83ffc898302394baa2042ca232fd> 9211 9211 100
backboardd <b5d33ca6da9c33d48e2c8ccb9930c3dc> 8716 8716 50 (daemon)
aggregated <3e381378eb7f3dd2846920cb5db91265> 523 523 50 (daemon)
lockdownd <d998e2bac7663966bd0285c07ed89111> 276 276 100 (daemon)
configd <20b29bb0286e347ebe7c42aa8ee421c9> 462 462 100 (daemon)
fseventsd <8876b6f5a0c13024a12cb3e148ddab61> 303 303 100 (daemon)
fairplayd.H2 <243ccf92ad4d34cbb4fdf7e078d55141> 130 130 100 (daemon)
wirelessproxd <47699be4861c30abbb375e1d3b9e15dc> 153 153 100 (daemon)
BTServer <51d0d4421dc73abf9d4844e2b155c340> 536 536 100 (daemon)
distnoted <7895f761ec323e31a356860060f8713d> 155 155 100 (daemon)
UserEventAgent <9aedc371d1c037e7b5d7b5577f0424a8> 756 756 100 (daemon)
WirelessCoexMana <f5dcce7805a9308bbbcf2d52751385ef> 132 132 100 (daemon)
networkd <148d4512d2c43efc95bafd487fd97f4a> 577 577 100 (daemon)
filecoordination <7b1b1b1b4fe0364c8e0adfd90f78b4a9> 207 207 200 (daemon)
medialibraryd <fdf252b3fb1a3646a836c0c3b5840464> 634 634 200 (daemon)
touchsetupd <0a4f35337aa13e55a3d7e56296499e14> 154 154 200 (daemon)
ubd <30a03e11a5c43c7cbd6ecd1aaef27841> 470 470 200 (daemon)
CommCenter <463e099ed64e30ad9433b8ea3f4a4e94> 2039 2039 100 (daemon)
notifyd <5b4c0731afd533179b295e4f39e589d6> 335 335 100 (daemon)
**End**
<Post Edited By Host>Thank you for your reply.
>You can double-click the home button and then swipe upwards on the thumbnail of the app to force it closed.
Did that
>After that, power the phone off and back on again, test.
Did that
>If still a problem, force close the app again and then reset the phone, holding the sleep/wake and home buttons together until you see the Apple logo and then release. The phone will reboot, test.
Did that
>If still a problem, then connect the device to iTunes and restore from backup.
Did that
>If that does not work, it is possible there is something corrupt in the backup. The final step is restore as new, not from a backup.
This is the only thing I had not done before I posted my initial request for help. I will work on that....it's a last resort I was hoping not to do, but it sounds like I've already done everything else.
Thank you.
Maybe you are looking for
-
Flashplugin 10.2.152.27-2 Crashes Constantly
Hello all, I've recently (within the past 2 - 3 days) started having a problem with the flashplugin crashing constantly when watching YouTube videos (not sure about other sites as I can't think of any that use flash video player). If you click on a v
-
ITunes HD movie download stuck at 0%
I've been waiting days for Cars 2 HD to download. Standard def and iTunes extras file downloaded fine. HD just stuck at 0%. iTunes support after several attempts have just washed their hands of the situation and told me to telephone support and ef
-
Hi, I am using iPlanet 5.2 on Solaris 8. When a separate changelog Plugin is being used the iPlanet Directory Server crashes after receiving the signal SIGBUS BUS_ADRALN. However, if Retro Changelog Plugin is used, the changes are processed without a
-
DDE Package refusing to take more than 265 CHAR
Dear all, i'm using Oracle 9i, i'm using the DDE package to get data from Excell this is my code DECLARE CONVID PLS_INTEGER; AppId PLS_INTEGER; BUFFER VARCHAR2(5000); LEN NUMBER; BEGIN AppId := Dde.App_Begin('C:\Program Files
-
How van I install the BI Beans samples? there isn't a documentation
From the page of installing the Oracle BI Beans Samples there is only; the content of samples, for what is used. Thanks in advance