Handling Popups in Excel with ActiveX
I'm having a problem similar to the problem referenced in this post:
https://forums.ni.com/t5/LabVIEW/Handling-popups-of-Excel-while-editing-it-via-Active-X-Control/td-p...
The difference being...
My company has an Excel "database" that stores all of our product information. When starting my application I read from this database using ActiveX. Recently this Excel sheet was updated to include new capabilities by someone else within my company.
Now, when opening this particular worksheet, I get this message:
It doesn't come to the front of the screen, and unless the user realizes that it is coming the LabVIEW program seems to hangup, causing the user to close the LabVIEW program, because they don't realize that LabVIEW is waiting on Excel, which is waiting on the user to make a selection on this popup.
In the post I referenced above, they get around this by using a Property Node with the "Display Alerts" property set to false. This works for hiding errors but doesn't seem to work for this instance.
Is there a way, through ActiveX, to "click" the "Don't Update" button without the user having to do this.
OR
Worst case scenario, is there a way to bring this popup to the front to alert the user that Excel needs input?
Thanks
Solved!
Go to Solution.
If anyone stumbles upon this page looking for a solution, here is how I ended up solving the issue:
http://support.microsoft.com/KB/826921
Similar Messages
-
LabVIEW and Excel with ActiveX
Hi,
I am using LabVIEW6.1 and I am trying to format data for printout that I have stored in Excel using activeX.
I have three questions that I included the recorded Excel macro for:
1) How do I set the horizontal and vertical page breaks using ActiveX?
Excel macro:
Set ActiveSheet.VPageBreaks(1).Location = Range("F1")
Set ActiveSheet.HPageBreaks(1).Location = Range("A41")
2) How do I set the print area using activeX?
Excel macro:
ActiveSheet.PageSetup.PrintArea = "$A$1:$J$57"
3) How do I left, right center justify the content of cell using ActiveX.
Excel macro:
Range("B3:B8").Select
With Selection
.HorizontalAlignment = xlCenter
End With
Thanks in advance for your time.
KMAYou cannot index the VPageBreaks if you are creating a new worksheet. You would use the index to change an existing VPageBreak. To create a new VPageBreak, replace the Item method with the Add method. Wire the range ref directly into the Before input. I fixed your VI and attached it.
To get the value of the xlCenter constant, open the Visual Basic editor that comes with Excel and use the Object Browser (F2). Type xlcenter into the search window and click the binoculars. The value is displayed at the bottom of the window. You will use that trick a lot when looking for the Excel constants for LabVIEW.
Michael
Michael Munroe, ABCDEF
Certified LabVIEW Developer, MCP
Find and fix bad VI Properties with Property Inspector
Attachments:
Excel_Page_Break_mod.vi 67 KB -
Help with quitting Excel with activex (save-dialog)
Hello.
I have following question.
I have a VI that writes data from measurement devices into an excel file. Afterwards I want to change the order of the entries with the help of activex.
All that works fine, but when I quit excel the save-dialolg always pops up. I searched this board for possible solutions and experimented quite a bit but I still get one dialog at the end.
Well, now at least it is only one and not multiple ones. The loop in my the implementation for the data manipulation might be the cause, but if it is it, i don't know why or how to solve it. But maybe it is something different. Anyway, I cannot find the reason.
Some help would be really appreciated .
Thank you very much in advance.
Regards
CD
Solved!
Go to Solution.
Attachments:
labview excel.JPG 136 KBOK. In the attachment is a picture of the modifications.
Now I have to two problems.
First, after running it in highlight modus, I now know the dialog pops up at the _Workbook.close invoke node. Despite setting true to SaveChanges.
Second, I now get an error code -2147352565 - unknown error at invalid index. and nothing gets saved.
Attachments:
labview excel changesI.JPG 79 KB -
Closing Excel with ActiveX causes problem
Hallo,
I am having a problem using ActiveX and Excel. I
am using NT 4.0, Service Pack 3, Excel 97, Service
Release SR1 and LabVIEW 5.1.
My LV application opens an Excel worksheet,
operates on the sheet and then closes it by using
ActiveX. Everything works fine until I try to
start Excel from the desktop after running my LV
application. Then I get an "Exception access
violation" generated by excel.exe. It seems like
my application does not manage to end the
excel.exe process which leads to the "violation
error" next time Excel is to be opened. To quit
Excel I call the "quit" method in
Excel_Application and then call the "Automation
Close".
Anyone knows how to solve this?
\Helena Dimitriou
Sent via Deja.com
http://www.deja.com/
Share what you know. Learn what you don't.Greg, this is the problem: Granted that Excel closes properly when users try to close all opened refnums, when this VI is used as subvi (loop) "Excel.exe" does not close (every instance opened). It stays in the Task Manager until the program that uses this subVI ends. This is not good because "Excel.exe" uses a large memory.Just think what will happen if I try to use this "Excel" subVI a couple of hundred times in an application VI. It leaves at least 6000kb of memory for every instance multiply it by a couple of hundreds, then your PC crashes.
Another, open only one instance, the "Excel.exe" process remain in the Task Manager.
What can you say? You haven't tried?
Try this: create a vi which will open the Excel Application (wire the "open new instance
" terminal to TRUE), open an existing Excel workbook, add sheet, write numbers 1 to 255 from A1 to A255 and B1 to B255 to the added and close the ranges where the numbers are written, close the added sheet, close the opened workbook and close the Excel application. Then use this vi in a loop that iterates 500 times so that 500 sheets (plus three as default to Excel) will be added to the opened workbook. Before running the VI with the loop, open your Task Manager>>Processes. Run the VI and monitor how many "Excel.exe" while the loop is running and the memory usage it consumes. And take note of the "Excel.exe" which will remain in the Task Manager after the vi with loops ends. Then e-mail me ([email protected] OR [email protected]) of things that went wrong and how to solve the problems that causes for things to go wrong.
Of course you can also send your VI.
This my main problem. -
Writing array to Excel with ActiveX
Common question I suppose, but I'm still having issues despite reading several posts about the issue.
Problem is I'm trying to write a 1D array of data to 1 column in an excel document. However, unless I add an artificial column (of blank values or some other bogus #), ActiveX only writes the 1st value of my array to the column.
Look at the attached. In Picture 1 I add an articial column and everything writes fine. In Picture 2 I don't add this column and only the 1st value of the array gets written in each row.
Suggestions?
Thank you.
Solved!
Go to Solution.
Attachments:
images.jpg 233 KBI haven't done much with Excel and LabVIEW by way of ActiveX. Creating a small VI and duplicating what you show in your screenshot, I see the same behavior.
I believe that Excel interprets a 1-D array as something that runs horizontally. So a 1-D array consists of a single row of cells and N number of columns.
(Actually LabVIEW interprets a 1-D array like this as well, but it allows you to show an array onscreen either vertically or horizontally.)
Converting to a 2-D array and transposing is what you need to do to have that 1-D array be treated as a single column of cells.
Note that you don't have to use build array and append an empty array to it. You can just use build array as is and it will turn a 1-D array into a 2-D array.
Attachments:
Example_VI.png 22 KB -
Can't open excel file after saving and closing excel with activex
I'm using activex to write and save excel files in LabVIEW. My application opens excel (not visible)writes a file, saves it, and then closes both the file and excel. When I try to open the file Excel opens but the file is not displayed, I see the excel header and footer but the file itself does not display. My application is still running at this point. Any suggestions?
It is critical when using ActiveX with Excel that ALL refnums be properly closed when they are no longer used. Just a single refnum left open will cause the exact situation that you describe. Typically, but not required, the refnums will be closed in the reverse order in which they were created. Here is a good sequence:
Open Application ref
Property Workbooks ref
Open Workbook ref
Close Workbooks ref
Select Sheet ref
Select Range ref
Write Value2 to Range
Close Range ref
Close Sheet ref
Save Workbook
Close Workbook ref
Close Application ref
When you have properly closed all refnums, the problem will disappear.
Michael Munroe
Certified LabVIEW Developer
www.abcdef.biz
Michael Munroe, ABCDEF
Certified LabVIEW Developer, MCP
Find and fix bad VI Properties with Property Inspector -
How to list all currently open Excel files with ActiveX?
Hello all!
I would like to program with ActiveX a way to retrieve a list (array of strings) of the filenames of the currently opened Excel files in windows. However, I am fairly new to the ActiveX/Excel business in LV and after hours looking at the "millions" of objects in the property nodes I give up and hope some kind soul here can help me. I couldn't find any information in this forum regarding the same issue, although some were close
I am using LV 7.1 without the Report Generation Toolkit.
Thanks!
/GoranHi KC,
thanks for your reply. I have in fact been able to find the desired things in the ActiveX properties/methods for Excel in LabView. It took me some looong work going through the functions which I suspected to be the ones. Anyway, I post a little jpeg here of the code if someone ever needs the same functionality. What it does is that it checks how many Excel workbooks are open and controls if each of them matches the searched Excel filename, if one does, it is closed.
Enjoy
/Goran
Attachments:
List open excel sheets and close open ones.jpg 104 KB -
Read 2 Strings from EXCEL with GOOP or ActiveX?
Hello,
i use Labview 5.1 with WIN NT4.0 SP6a and i programm a fuzzy Logic tool for a exam in Computer Science.
Now i have a problem, and i read something about the GOOP and the EXCEL Toolkit. I download it and try more times to install but i can't link the *.llb in the Function Palette. Is this GOOP and Excel Toolkit only for Labview 6.x ?
I solve it with ActiveX and Excel, but my very big Problem is, i need to read2 string from the Excel table from the same time, and with ActiveX i don't find any method how can i do that.
I don't know how can i read 2 Strings from a Excel table, Can i do it with the Excel Toolkit,if yes how, maybe anyone make it or any helpfiles?
Thanks for your answer in advance ,
Ender
Ekinci"fuzzylogic" wrote in message
news:[email protected]..
> Hello,
> i use Labview 5.1 with WIN NT4.0 SP6a and i programm a fuzzy Logic
> tool for a exam in Computer Science.
> Now i have a problem, and i read something about the GOOP and the
> EXCEL Toolkit. I download it and try more times to install but i can't
> link the *.llb in the Function Palette. Is this GOOP and Excel Toolkit
> only for Labview 6.x ?
>
> I solve it with ActiveX and Excel, but my very big Problem is, i need
> to read2 string from the Excel table from the same time, and with
> ActiveX i don't find any method how can i do that.
>
> I don't know how can i read 2 Strings from a Excel table, Can i do it
> with the Excel Toolkit,if yes how, m
aybe anyone make it or any
> helpfiles?
I'm pretty sure the excel toolkit is written for 5.1, and don't know why it
would give you problems. Do you have excel installed? I'm not sure what
you mean that you cant link the *.llb in function pallette. Have you tried
opening the llb using '\functions\select a vi' ? As to how to read two
cells at once, you could read a block of cells including both cells (ie:
A5..D10) and then pull the data out of the array. -
Need help with Excel and ActiveX
I am new with working with ActiveX, so I need some help regarding writing to a spreadsheet. Here is what I need to do:
1.The user weighs a product on a scale.
2.The user presses the weight button control in labview to retrieve the weight via serial port.
3.The value gets written into a spreadsheet, starting at D2.
4. User weighs the same product after use to get a new weight.
5. labview goes through the same process, but this time it gets written to E2.
6. Differential is calculated (still debating on having the user do this in Excel instead of Labview, since they have to set up a spreadsheet outside of labview for other info not related
to weight).
7. User close labview when finished.
The serial comm and all is fine, but the problem I am having is trying to get a specific cell value written in D2 and then getting another value to be written in E2. For example, initial weight would be D2 and post weight would be E2, and then differential would be F2. For the next product, it would be D3, E3, F3, and so on. What would be the best way to implement this? It looked as if ActiveX would be the only real way to tell Excel where to put the data, but there is still alot I have to learn in where to find and use the proper nodes to complete the process.
Thanks,
Jody M.
The Procter and Gamble Co.
Certified Labview Developer
Currently using LV2012.Hi z2830than,
see the attached example. It make following things: open Excel, create new Workbook, ..., write Data to D2, save Workbook and close Excel.
Hope it helps.
Mike
Attachments:
Excel_open_write_close_Example_LV71.llb 234 KB -
Excel Get ActiveX References​.vi and closing references -- grrr
I'm new to ActiveX stuff, but eager to learn!
The "grrr" in my Subject line is a reference to how I feel about LabVIEW's documentation from time to time. I'm a dinosaur who came from text-based programming, and did a fair amount of C coding, so sometimes with LabVIEW I'm left with this awful feeling in the pit of my stomach like, "Good grief! How much memory must LabVIEW be hogging up in the background when I use this vi?" or "What happens to those variables (wires) in that subVI when it completes but doesn't close? What are their statuses when I come back in the next time?" or "What if I put a lot of elements into that array the first time and then started from element zero the second time and just put in a few? What has happened with the memroy that was allocated when there were a lot of elements?"
Today I'm stewing about this "Excel Get ActiveX References.vi," and what happens to the "ActiveX references" it generates each time I call the subVI in which "Excel Get ActiveX References.vi" lives. I think that at least one of the "ActiveX references" it generates when I call it is of the type Excel._Application. Then there appears to be an Excel._Workbook, and others. You see, I've used "Excel Easy Report.vi" to put some data into an Excel spreadsheet, and I want to tell Excel to do a "Save" on the open spreadsheet. I think ActiveX is the (a) right way to do that, so I'm wading into the ActiveX fray... But this "Excel Get ActiveX References.vi" says in its help file, "Do not close ActiveX references opened with the Excel Get ActiveX References VI. References must remain open until the report is closed. Otherwise the error 3001 will occur." Well, these Excel workbooks that get created by my VI could well stay open until after my LabVIEW VI terminates!
So (finally), here are some of my quesitons:
1) When I go through my subVI once, pointing to one workbook, I'll get one set of references "created" or "opened" or whatever you call it when ActiveX references spring into existance. Now, when I exit the subVI, is it going to automatically try to "close" those ActiveX references? I don't suppose so, since subVI's stay in memory until the calling VI closes.
2) Now, I come back into my subVI a second time. New workbook gets created, so I get new references. Ok, fine. Uh oh! What happened to those old references? I suppose that if I didn't somehow save them off, I've probably lost the ability to get them back (maybe I'm wrong, but I don't need them back), but is LabVIEW going to "close" those old references (from previous times through the subVI) because I can't get to them anymore? Won't that cause the dreaded error 3001? If LabVIEW is not going to "close" them, what in tarnation happens to them (the old C programmer in me creeping back out)?? Now it's some oddball, orphaned reference, floating out there, hogging memory, waiting to make something crash intermittently and be a debugging nightmare?
3) Now, here's the real scary one. I think I might dodge the "error 3001" bullet in questions 1) and 2), but now let's say the user closes my LabVIEW application while Excel is still open. All those workbooks are still open. Presumably, all those ActiveX references I was not supposed to close are still open. I really hope that LabVIEW is decent enough to close/erase/delete/blow-away (whatever the right word is) all those ActiveX references which were opened/created by "Excel Get ActiveX References.vi" when my program terminates. But, oh no! Won't the error 3001 come along then? I suppose I can just dump it in the shutdown error handling.
Well, thanks for reading my novel. I don't know what can be done with LabVIEW documentation to make it more satisfying to folks like me, but perhaps someone can weigh in on all my ActiveX questions here.
Thank you in advance,
Steve Brady
Solved!
Go to Solution.You need to close EVERY ActiveX reference you open. If you don't you'll end up with some Excel processes running even after LabVIEW exits. You can see them in Task Manager.
I, personally, don't like the LabVIEW Report Generation Tool Kit for working with Excel. I don't think it's flexible enough. I have a growing library of VIs that I've written that open, manipulate, and close Excel. Some references I pass from VI to VI and some I close right after I use them. It all depends on what I'm doing. If I want to enter read or write data from/to a certain range I'll get the range reference, read or write the data, then close it right away because I have no use for it any more. On the other hand, when I open Excel or a Workbook I keep the reference until I'm done, which could be later in the program.
1) When I go through my subVI once, pointing to one workbook, I'll get one set of references "created" or "opened" or whatever you call it when ActiveX references spring into existence. Now, when I exit the subVI, is it going to automatically try to "close" those ActiveX references? I don't suppose so, since subVI's stay in memory until the calling VI closes.
2) Now, I come back into my subVI a second time. New workbook gets created, so I get new references. Ok, fine. Uh oh! What happened to those old references? I suppose that if I didn't somehow save them off, I've probably lost the ability to get them back (maybe I'm wrong, but I don't need them back), but is LabVIEW going to "close" those old references (from previous times through the subVI) because I can't get to them anymore? Won't that cause the dreaded error 3001? If LabVIEW is not going to "close" them, what in tarnation happens to them (the old C programmer in me creeping back out)?? Now it's some oddball, orphaned reference, floating out there, hogging memory, waiting to make something crash intermittently and be a debugging nightmare?
3) Now, here's the real scary one. I think I might dodge the "error 3001" bullet in questions 1) and 2), but now let's say the user closes my LabVIEW application while Excel is still open. All those workbooks are still open. Presumably, all those ActiveX references I was not supposed to close are still open. I really hope that LabVIEW is decent enough to close/erase/delete/blow-away (whatever the right word is) all those ActiveX references which were opened/created by "Excel Get ActiveX References.vi" when my program terminates. But, oh no! Won't the error 3001 come along then? I suppose I can just dump it in the shutdown error handling.
1) No, LabVIEW will NOT close those references. You need to make sure that happens.
2) You can save the references in a functional global or use a class but if you're not going to save them close them as soon as you're done with them.
3) Your user should not be able to close your LabVIEW application without it going through the shutdown routine you've created for your program. The ABORT button should never be exposed to the user and you should capture and discard the panel close event so your program ALWAYS shuts down is an orderly fashion. If you don't you will have fragments of Excel hanging around in your operating system and will have to kill those processes using Task Manager. That should only be a problem during development, not once deployed.
I used to program in C and Assembly many moons ago. You should have seen my first LabVIEW code. I go back and look at it just so I can see how far I've come in the last 12 years. I feel your pain.
Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome -
I hate to beat this to death but I was unable to find a
clear answer to this question. Does NI provide Excel control from within
Visual C++ 6.0?
I read that NI supports the ANSI-C library only for Visual C++ 6.0 users:
Thread : "Re: Benifits of using measurment
studio for VC++ 6.0?"
NI REP : drohacek
Quote : "we made the decision to support Visual
C++ 6.0 users only through the ANSI-C interface and not through the Measurement
Studio MFC-based class libraries."
If there is a suggested way of controlling Excel from within Measurement Studio
for Visual C++ 6.0 then I’d love to know it.
If not, can a plain statement be made basically stating that if you want
to control Excel you can’t use a Visual C++ 6.0 environment even with Measurement
Studio support?
With .NET of course you can just decide to have Excel support added during
project creation. CVI can act as an ActiveX server and easily control
Excel just by building off the examples shipped with CVI. I see that
there is support, using the Measurement Studio for Visual C++ 6.0 Project Wizard,
for taking existing CVI projects and converting them to Visual C++ 6.0 projects
or for calling CVI libraries from a .dll from within Visual C++ 6.0. I suppose I could do the work
in CVI and then convert the project but I'm so deeply tied into all my MFC calls that I don't see
how I can cleanly include the CVI libraries into my existing VC++ 6.0 projects.
What I'm really after here is a visual graph control like the one in CVI that I
can use from Visual C++ 6.0. I purchased a 3rd party graph control for use
in VC++ 6.0 that works well but isn't really visual. I mean you can't
enter any values in it until you run the program and fill it out programmatically.
Then you can see which columns are two narrow, quit the program, adjust the
column width of your now empty control, and repeat, until you get the thing
looking the way you want. If I could call into Excel from within Visual
C++ 6.0 the way I do from within .NET
then I could use Excel to hold the table and just read in the values into my table
control at run time. Basically I'd use Excel as a visual development tool
for all my tables.
I do all my coding from within CVI and Measurement Studio for Visual C++
6.0. I'd use CVI for everything if I didn't depend so heavily on certain
outside controlled C++ .dll's. Could you please suggest then what I can
do to get Excel support for Visual C++ 6.0?
Last question :
Is there any plan to ever have a NI table control like the CVI table control for
use in Visual Studio? One that you can
completely set up before you do any compiling?
I imagine that the way Microsoft sets up their environment makes this idea impossible. Otherwise someone would
have come up with a truly “visual” table control before now.
Thanks,
Grant
Grant M. Johnson
Project Engineer
LECO CorporationHello Grant
You can most certainly use Excel with VC++ 6.0. Measurement Studio won't provided you with any classes to talk to Excel in VC++ 6.0. This is because Excel allows control via Automation and you can use its automation API to do anything you need with Excel. This is what CVI uses as well.
You can see this MSDN article on how to set this up. This mentions VC.NET, but it should work the same way.
Here is one that talks about VC 6.0 and Excel.
Here is a code project article about this.
Even with .NET, you have to do thru the Excel Automation support. Excel started shipping with Primary Interop Assemblies (PIA) which are .NET wrappers about the Excel Automation object model. C++ Automation is definetely not as nice as .NET, BTW
See this document for more information about the Excel object model.
I would not recommend using the CVI Excel libraries if all you want to use them for is Excel automation. You will end up creating un-necessary dependencies and go through extra layers that way. You can make calls straight to Excel from VC++ without requiring CVI.
One quick observation about your excel approach. If you decide to use Excel as your table, you might be requiring everyone who uses your application to have Excel installed on their machines. Just wanted to make sure this was acceptable to you.
Have you looked at the Datagrid Activex control, which is one of the common controls that ships with Visual Studio? You can add it to Visual Studio by right-clicking and picking it from the list of installed activex control. If you have not already, you should check it out.
Microsoft has made significant improvements in the number of controls they provide with .NET. They have a Datagrid control that seems to be what you need.
Measurement Studio did add some high level classes for Excel and Word Automation that simplify some common tasks, but these exists for VS 2003 C++ and VS 2005 C++, not for VC 6.0. Underneath, we end up using the same Excel automation classes, so you can easily setup something similar for VC 6.0. Plus you can find alot of references online on how to use the Excel Automation object model with C++.
We currently have no plans in Measurement Studio to create a table control unfortunately. I am assuming when you said graph, you actually meant table, since Measurement Studio already provides a ActiveX graph controls for VC++ 6.0 that is very similar to the CVI graph.
On a side note, VC++ 6.0 is really really old. Have you considered upgrading?
To summarize
- Yes, you can use Excel with Vc++ 6.0 without mstudio.
- Try using the Datagrid Activex control if you just need a table.
- Measurement Studio provides high-level excel and word classes for VC++ 6.0
- Measurement Studio provides a graph control for VC++ 6.0 which is very similar to the CVI graph.
- Measuremnt Studio does not have a table control.
- VC++ 6.0 is really really old. Have you considered upgrading?
Bilal Durrani
NI -
How to create rtf template to view report in Word and Excel, with numeric f
Hi,
Please help me!
How to create rtf template to view report in Word and Excel, with numeric formatted fields (like this 999 999 999,99 with spaces between numbers) and then end user be able to process those fields with Excel tools (sum, etc).
Thank you.From what I have seen Excel can not handle 999 999 999.00. You can use 999999999.00 and then format it as you want in the xls bt you can not have values like 999 999 999.00 coming from publisher output and have functions on the values in Excel
Tim -
Writing to Excel using ActiveX improvement?
Hello,
At my company we have Labview 2011 basic version with DAQmx. I am writing a program to get temperature data from thermocouples (16), dump it in an array and then store it in Excel using ActiveX. ActiveX seems only to allow writing element by element to my spreadsheet. When you do acquisition for a long period of time it can be very long! I like using ActiveX because it allows some flexibility such as choosing which sheet and cell I can write my data. Is there a solution to dump the array in one operation using ActiveX?
I know there is a block call write to spreadsheet which accept 1D and 2D array of data but doesn't allow the same flexibility. I also found report generation but is it made to write data? While waiting for your answer I'll try to dig a little more that blockset.
Thank you very much and I hope to hear from the community really soon.
RegardsI have to appologize. The solution given by Electromecha was good but only outside a loop. Again, I have 16 thermocouples and when I use Electromecha's solution inside a For loop it will copy only the first element. I attached two pictures. One is the program and the second is the result in the spreadsheet. You will notice that inside my loop I added an indicator to read the array before writing it in Excel. The indicator shows the array perfectly with all elements in it. The only way I found to work around this issue is to use indexing and write element by element in Excel. That is way too long!
For your information, the loop itteration is defined using the array size which is 16 (for 16 thermocouples). The subvi inside the loop allows me to get the column letter from the itteration number. Finally using the size of one full array of results I get the end cell row.
If more explanation is required please let me know.
Many thanks!
Attachments:
Excel.JPG 89 KB
Program.JPG 69 KB -
Problems with ActiveX Callbacks in LabVIEW 7
Have encountered an interesting problem with ActiveX "Reg Event Callback" in LV7 (WinXP):
In a nutshell, when a lot of events fire in rapid succession, the user-interface locks up.
The events still fire, and the front panel controls update, but the front panel will not respond to clicks. Interestingly, if the block diagram is open, you can stop it and turn on execution highlighting, etc...
- I've discovered that the problem we're encountering is related to multiple events firing before the (reentrant) callback VI has finished executing from the 1st event.
- by watching the Performance data in task manager, and tracking the # of handles used by LabVIEW, I find that when this happens, the # of handles increases, b
ut never decreases until you stop the VI
- I would expect several (nearly) instantaneous events to launch multiple copies of that callback VI, and I can believe that would increase the # handles, but I would expect that LabVIEW would catchup shortly thereafter and the # handles would return to its starting count.
As an aside, using the old ActiveX event and callback method with the exact same version of the activeX control does not have this problem, events just queue up and then fire appropriately.
Anyone seen anything like this?
Anyone (NI guys) have any ideas?
Follow up question (NI guys): when will the support for the old ActiveX event stuff dry up?
Thanks in advance,
Ben
Ben Zimmer
[email protected]
Software Developer
Meikle AutomationHi Ben,
The error message warns about the use of three ActiveX Event VIs that will no longer be supported in future versions of Labview. Following version 6 of Labview, the use of ActiveX Event VIs is shifting to the use of Register Event Callback VI instead. In looking at your screenshots, I did not see any use of the older ActiveX Event VIs. If possible, try attaching the actual VI to the post and I will take a look at that.
At least in terms of support, phone support currently exists for Labview 6 and 7. With the release of Labview 8, support for Labview 6 will slowly be phased out. In this case, phone support for the ActiveX Event VIs will no longer continue as they are no longer included in the versions of Labview for
which phone support is provided. However, Discussion Forums and web-based resources would be your best venue of support for those features.
I would strongly recommend that you migrate to replacing ActiveX Event VIs to using the Register Event Callback VI. The following is a KnowledgeBase article describing the transition of ActiveX in Labview:
Migrating from the ActiveX Event VIs to Using the Register Event Callback Node
Also, are you using the Automation Open/Close VIs? These two VIs will allow acquire/release informatio nof the ActiveX object. I have attached a couple example programs that are included in Labview to help demonstrate this concept.
Hope this helps!
Kileen Cheng
Applications Engineer
National Instruments
Attachments:
ActiveX_Event_Callback_for_Excel.llb 944 KB
ActiveX_Event_Callback_for_IE.llb 972 KB -
Computational Ability to Handle Super Big Excel Files
My son lives overseas and is in the business consultancy business. He will be visiting us in the USA next week and plans to buy an iphone (if there are any available). He is a committed PC user but is getting frustrated with the computational slowness of his laptop PC when handling really large Excel files. Large = 15 linked excel files each averaging about 400 megabytes. Remember, his business is based on running iterative analysis of spreadsheet variables so there is considerable processing going on.
Question: Would the fastest MacBook Pro dual Intel processor model be better at handling these large files than a fast PC laptop, i.e. would the MacBook Pro offer him processing advantages? Would he also be able to let the Excel program grind away in the background while using the Mac to do mail messages and other work concurrently? I'm thinking that if he gets an iPhone he should go ahead and get a Mac and have the best of all worlds. Your comments are appreciated.
Thanks,
BillWell, if he runs the Win version of MS Excel under Bootcamp/Win it will run at the same speed as on an identically specced PC notebook - no idea how many PC notebooks with 2.4 GHz Santa Rosa chips, 4GB RAM and an comparable graphics chip are available though - if they exist, the MBP should be competitive in price and will run almost any OS (using Bootcamp or Parallels).
The story changes looking at Office for Mac - the current version is not Universal and runs under emulation - it will be slower than the Windows version, the future MS Office for Mac will be Universal, but will not support VBA/scripting - this should make it unusable for your son (I am sure these multi-spreadsheet applications rely heavily on scripting).
In general OS X handles multi-tasking a bit better than Windows, so yes, having a demanding process running while working in other apps might be slightly better.
Cheers,
Uwe
Maybe you are looking for
-
This is the message that I am recieving when I compile to the cRIO I am working with. FATAL_ERRORortabilityortDynamicLib.c:358:1.27 - dll open of library <C:/NIFPGA85/Xilinx\bin\nt\libGenXstTask.dll> failed due to an unknown reason. Process w
-
How to setup HTTP client for HTTP to File scenario
Hey guys i have a scenario wherein one of our clients is sending invoices(as XML message) over HTTP(client is outside our landscape) and i have to to send this invoice to a File system from where it will be picked up by an ABAP code(picking of the f
-
I Received my iPhone 5 as a gift, but it was the 16gb- and now- with apps being bigger and HD- they are bigger in size- so this 16gb will not last me. Main question: If my iphone 5 was bought at radioshack as a gift can i exchange it for a 32gb.? - i
-
Weblogic to JBoss Migration Steps Needed
Hi, I am migrating from Web-logic 10.0 to JBoss 6.0. What are the migration steps I need to take care? Any links is highly appreciated. I am looking at the following points:- Code Organization Deployment Descriptors Security JNDI (DataSource, JMS, et
-
S.M.A.R.T
i just connect my cruppted external hard disk to my iMac G5 through the USB cable, i got the msg in the finder which is gave me 3 different options: initialize, cancel & Eject. i tried to open the Disk Utility to repair the disk, but the REPAIR DISK