ActiveX event queue in Labview 7.0
I've acquired an Ortec toolkit with ActiveX controls and am trying to
follow the procedures shown in the manual for handling ActiveX
events. The manual tells me to add 'Create ActiveX Event Queue
node', "Wait on ActiveX Event Node' and 'Destroy ActiveX Event Queue
node' to my vi. The problem is, the manual was written for
Labview 5.1, and I have Labview 7.0, which no longer uses these
nodes. Instead, LV 7 uses the 'Register Event Callback Node'. Can anyone tell me how to alter the attached vi to use the Register Event Callback Node instead of event queueing?
Attachments:
EventsExample.vi 80 KB
hi there
see attachment for an example (because i don't had your control i used one of MSCOMCTL)
best regards
chris
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!"
Attachments:
AX Events 7.0.zip 13 KB
Similar Messages
-
I can not get LabVIEW to respond to a VB6 ActiveX event
I am working with a VB6 ActiveX dll (VBtablet.dll is a wrapper for Wintab32 for a tablet interface) using LV8.2.1 and can not get it to respond to an event. I have opend the object and registered it for callback, but have had no luck in having an event generated. Is there anyway to see these events generated or at least that it has been registered? The dll has no problem working in a VB app or in Excel using a VB macro. Is there anything special that has to be in the ActiveX object to get LabVIEW to respond to it?
When I register the callback I use a control reference of the data being returned as my "user data" and in the callback VI I wire the event data into the "Value" of the control reference. I believe this is all I have to do. Any ideas would be helpfull.
Thanks,
Paulcueball wrote:
I am able to see that events are generated from the dll, but somewhere between the ActiveX object and LabVIEW it is disconnected. Is it possible that LabVIEW is excepting these events and not allowing then into the code. The path as I see it is
dll -> WinAPI -> ActiveX -> LabVIEW
One thing this dll requires is a windows handle and I am wondering if LabVIEW itself is reads the events directly instead of ignoring them. The reason I bring it up is that the tablet works like a mouse and I am wondering if it is absorbing these commands directly and not allowing them to be passed through the ActiveX object. Like this
dll-> WinAPI -> LabVIEW
therefore the event is never generated. That is why I wish I could speak with someone at NI that could explain that process better, but it seems like there is no one at NI who knows any high level issues.
First this are not high level issues but lowest low level issues. Some of it certainly is more Windows related than LabVIEW so support from MS, as unlikely it is to get that, would be at its place. NI people are not there nor can't really help you debug your VB issues.
Second you say it is a tablet and works like a mouse, then I'm wondering if Windows is not simply claiming it as a Human Interface Device itself and not really letting you control it yourself in your VB control.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
I have Labview 6.0/6.1 Activex vi's that no longer work in LabView 7.0 There are no longer ActiveX Events vi's in the Communications->ActiveX control set. What is the deal with that??? Pretty much makes my $2400 upgrade investment worth nothing as far as I can see.
kup,
Are you sure that your VIs no longer work? They should. The support VIs are located in "vi.lib\Platform\ax-events.llb". The functionality was not taken away, the VIs were simply removed from the function palette. Also, ActiveX Events may now also be handled using calback VIs. This is much better, IMO. Seach the examples for "ActiveX" and "callback".
-Jim -
Continuous event queue ?
Hi,
I'm using LV6.1 and I got a little problem with events. How do I make a continuous event queue for activex component, that means LV will respond every time when mentioned event fires instead of it responds just once. Does anyone have an example ?
Thanks in advance!It seems silly to even use two loops:
If you require two loops and want to use an event structure (maybe the rest of the code requires it), you can manipulate the event timeout, e.g. as follows.
Message Edited by altenbach on 09-13-2006 01:45 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
UpdateB.png 3 KB
updateB_2.png 22 KB -
Dear Fellow LabVIEW programmers:
Most of the systems you deal with are reactive. It means that their
primary function is constant interaction with their environment by
sending and receiving events. But most likely, they can have something
happening inside them too, even when they are not processing messages
received from outside. So, such systems have to continuosly react to
external and internal stimuli. Right? Moreover, most likely, they
consist of subsystems that are reactive too and, in turn, can have
their own "life", to an extent independent from other parts (with
which they still communicate, of course). Reactive (event-driven)
systems are more naturally modeled with active objects. So, why then
should we try to model and code them with GOOP and its passive
("dead"!) objects?
"Flat" State Machines have been known for decades to have severe
limitations. It's been more than 20 years since Dr. Harel invented
Hierarchical State Machines (statecharts) to fight those limitations.
Then why does NI still tout the same old good Moore FSM as the
ultimate tool for event-driven programming in LabVIEW in its $995
State Diagram KIt?
The LabHSM toolkit we are happy to present, makes it possible to
easily create and then maintain complex event-driven applications in
LabVIEW as a collection of HSM-driven active object VIs using a higher
level of abstraction and agile software development methodologies.
These active object VIs are created based on a universal Hierarchical
State Machine ( HSM or statechart ) template. So. all your code looks
similar regardless of its functionality!
We all love just jump to code, right? However, to be good boys, we
need to do design first. Then implement it in code. If the logic is
modified we need to redo the design first and then redo the code. When
using LabHSM where behavior information is abstracted into a separate
HSM data file editable with a supplied editor, there is no need for
coding separate from design any more. The modified behavior becomes
code automatically as soon as the HSM file is saved. Design is code!
The implementation basically follows Dr. Samek's Quantum Programming
paradigm. (see http://www.quantum-leaps.com). However, as already
mentioned, LabHSM stores the behavior information in a file separate
from the code itself. It also adds state dependent priorities to
events, a separate queue for public events/messages, and, of course,
some LabVIEW specific code like capturing front panel user events and
putting them into the private Events queue. Communication and
instantiation functions are also rather specific for LabVIEW.
It is available for UNLIMITED PERIOD trial. Please visit
http://www.labhsm.com for details and download. The site also contains
references which you may want to check to learn more about
hierarchical state machines and active object computing.
Since this is our debut we will appreciate any comments and
suggestions. Our contact information is available on our site, of
course.
Have a G'day!Symtx is currently hiring the following position. Please contact me if interested.
Amy Cable
Symtx, HR
[email protected]
Symtx, the leading supplier of functional test equipment, hires the brightest & most talented engineering professionals to design & manufacture complex custom electronic systems for advanced technology leaders in the defense, aerospace, communications, medical, transportation & semiconductor industries. Symtx’ challenging & dynamic work environment seeks to fill openings with highly qualified electronic engineering design professionals.The ideal candidate will be responsible for defining the requirements, software design and code development, and integration of test control software for custom functional test systems. Candidate should be familiar with data acquisition concepts, instrument control, complex test, measurement and calibration algorithm development and definition and implementation of control interfaces to hardware. Prefer familiarity with instrument control via GPIB, VXI, MXI, RS-232 desirable. Requires BS/MSEE and 3 -7+ yrs of experience in one or several of the following test applications in a Windows NT/2000/XP environment using Labwindows CVI, TestStand, Labview, Visual Basic, C++ and knowledge of RF systems is a plus. Job responsibilities will include software design, development, integration, team leadership, and interfacing with customers( includes PDR’s & CDR’s). -
Error "Event Queue Overflowed​" with the "Write file to Citadel Server"
Hello,
I can import data from a file and I can see the data
in the historical database without troubling.
But I always have this error "Event Queue Overflowed", that don't perturb my data and my application (I have just this boring message).
I have tried many things :
- increasing the size of my input buffer (-> 1.000.000, no change) : I don't think so that it's important because I've tried with a value of 100 and anyway sometimes my application works with this small value of 100.
- increasing the File_location tag size (-> 260). No change.
- My write to Citadel.cfg is in the LabVIEW folder.
Can you help me ?
Thank you.Hi,
What version of LabVIEW DSC are you using? if it is 6.1, have you applied fixes linked below.
http://digital.ni.com/softlib.nsf/websearch/513AA4A0BB60D10086256B48006D44B5?opendocument
I have seen a similar issue at the link below.
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=5065000000080000008C640000&ECategory=LabVIEW.Datalogging+and+Supervisory+Control
Please let me know if you have read it through?
Best Regards,
Remzi A. -
How to Pass Container in a queue from LabVIEW to TestStand?
I was succussful to pass simple type(string, number) using queue from LabVIEW to TestStand base on the example: Use TestStand Queue.seq.
I want to pass a container variable from LabVIEW to TestStand. But there are some errors happen.
Anyone who can help on this issue?
Thanks in advance.
Attachments:
Sequnce and VI.zip 28 KB
VI Error.jpg 61 KB
Run_time Error -17001.jpg 41 KBYou ought to have a listener somewhere that calls a function
to then set up the loaded swf. In that function you can do this
kind of thing:
var ldrmc:MovieClip;
function swfloaded (e:Event) {
ldrmc = null;
if (e.target.content is MovieClip) {
ldrmc = e.target.content as MovieClip;
If the swf was published for AS3, then ldrmc will end up
being a pointer to the root of the swf, and you can call functions
or set variables however you like. If it was an AS2 swf, ldrmc
would be null.
Inside the loaded swf you could try trace statements, to make
sure you're looking up the hierarchy far enough. Like this:
trace(MovieClip(parent.parent));
If that doesn't trace MainTimeLine, then maybe you're not
looking up far enough. Don't forget that the swf itself is in a
loader, and so may be one level down from where you thought it was. -
Hi folks,
This is probably very easy but I haven't found an elegant solution:
I have some variable 'eventtrigger' change a couple of times a second. After running my program for a while - 'eventtrigger' has already been updated a couple of times - I start a subroutine which listens to 'eventtrigger' in an event structure. The problem is that all the updates of 'eventtrigger' that occurred before the subroutine was started are queued up, and so I'm not triggering on what's happening now but on outdated stuff.
So far I clear the event queue by having a do-nothing-but-trigger event structure triggered by 'eventtrigger' in a while loop, plus a timeout event that is just a bit shorter than it takes for 'eventtrigger' to be updated. I stop that while loop when there is a timeout event.
Surely there must be a better way to clear the events that happened before?
Cheers,
WEnte.
Just a remark, I also stumbled over http://forums.ni.com/ni/board/message?board.id=130&thread.id=5544 ... Browser incompatibilities? Are we back in 1998 (this page is best viewed with...)?
Solved!
Go to Solution.I typically compare the actual value with the value from the event terminal and short out the event if they are not equal.
Here is a quick demo.
I am not sure how to apply it to your situation, because I don't know the details of your code. Still, maybe it can give you some ideas.
How does the event get triggered a few times per second? Is this via signaling properties?
LabVIEW Champion . Do more with less code and in less time . -
LabVIEW 7.1, PDA Module for Palm OS (long-time LV programmer, new to PDA module)
I am writing an app that displays a main screen of choices via Boolean button controls. An Event structure is used to detect ValueChange in the Booleans. When a button is clicked, a sub-vi is called that opens the sub-vi's front panel that has data display and a couple of buttons that are also processed by an event structure. I got a "event queue deadlocked" error message when testing. Does this application structure violate the "single event structure in a loop" rule, even though one queue is in a sub-vi? Must I use a state machine or some other architecture to make this work?
Thanks,
BevPA lot of time has passed but now I find the same problem and I have the solution.
If you have an event structure you MUST show the control and indicators involved in the cases in the front panel and in the monitor of your PDA/Touchscreen device, because oterwise the event queue deadlocked error appears.
It makes sense becasuse if you do not show them; you will never be able to call events and the aplication is going to stuck. -
hi there
LV 7.0: i'm using a callback vi with an registered ActiveX event (MSComCtl ToolBar/ButtonClick). i wait for the event with an event structure using dynamic events. how can i wait "ignore previous"? (like i did in LV 6.1 with the "Wait On ActiveX Event.vi").
thx in advance
chris
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!"hi sebastian,
here's my code. it uses the ToolBar Control from the MsComCTL. in case you don't have a development license i put an executable to the zip.
i want the event structure to ignore any pending events
(like the old style solution with "Ignore previous" = TRUE).
best regards
chris
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!"
Attachments:
ActiveX_Events_LV_7.0_(using_MsComCTL-ToolBar).zip 234 KB -
Hello,
I am using a COM dll server (USBIO in attachment) from LABView. This is only a COM server and NOT an activeX control. I have successfully managed calling its methods and properties (with the activeX "Invoke node" and "Property node"). But now I have been trying to use its events call-back functions. I tried to "list events description" from the ActiveX menu. But this function doesn't list anything.
Does normally the ActiveX "list events description" function success with a dll COM server ?
I know that this COM server can be accessed from Visual Basic (properties, methods, AND EVENTS). I have read in the forum that I probably have to write a wrapper dll to encapsulate the events call, or perhaps writing an activeX control in Visual Basic.
D
o you know
- how difficult these are ?
- What are the principal steps to manage these ?
Thank you very much for your reading.
Attachments:
usbiocom.dll 132 KBPierre_a,
Multiple posting of the same question is not likely to result in an answer. The die-hard experienced regular posters of this forum are volunteers and rarely do not answer a question that they know the answer to. I have attached links to your other postings so that the volunteer that decides to help can have access to all of the information.
ActiveX Events "Object specified is not creatable"
activex events
ActiveX Events
activex events
activex events
In my opinion the answer to your first question is that it will be very difficult to create wrappers for COM dll servers. I do not have the slightest idea how to go about doing this and I have used LabVIEW intensively for years. Because I am ignorance of COM dll servers, I recommend digging through the web in the slight chance that someone else encountered a similar problem and was kind enough to publish their efforts.
Finally, you mentioned that you read �in the forum that I probably have to write a wrapper dll�
. Can you provide a link so that others can understand more about the potential solution? -
Error while deleting events from the integration event queue
I am trying to delete all the events from the integration event queue after reading it, like this (this is in Java):
IntegrationEventWS_DeleteEvents_Input input = new IntegrationEventWS_DeleteEvents_Input();
input.setDateTime("");
input.setLastEventId("");
try {
((Default_Binding_IntegrationEventWS)onDemandStub).deleteEvents(input);
} catch (Exception e) {
log.error("Deleting events from integration queue failed: ", e);
}Alas, I get the following error message:
Invalid method parameter(s): 'File Id'(SBL-ODS-50007)What does this mean? What is this mysterious "File Id" it supposedly gets? I don't see it anywhere in the SOAP message I'm sending and it isn't mentioned anywhere in the docs.
Thanks in advance for any input.Dont keep this attributes null
input.setDateTime(""); //Put a Default Time way in
the past. Ex:"1/1/2000"
input.setLastEventId(""); //pass the eventIdThe documentation states that those two are optional (although they are not nillable, for some reason). I tried to set the date to today, but I got the same result. Since setting a date is supposed to delete all events older than that date, I don't think setting it in the past will delete anything. -
Event Handling in labview with arrays as event data
Hey folks,
I have a Labview Application which uses a dll to read Ethernet data. The setup is such that, when the dll has fresh data it sends out an event to the Labview Application so that the fresh data can be displayed.
However i have only managed to get this event based mechanism to send out a single structure at a time. Hence if there are 10 fresh data values, i need to send out 10 events (each event structure contains the parameter name, parameter value, unit and time stamp). It would be more efficient to send out an array of structures in a sigle shot.
I have tried this but Labview keeps crashing saying that an error was encountered and Labview needs to close along with an access violation message. I did a lot of online searching and found some LV code for event handling but not come accross any implementation which uses arrays as evend data. Is this supoorted? And if so is there any example vi that can be shared so that i get some knowledge about this.
Many Thanks in adavance,
Abel.I also gave a try by using a variant as the event data type instead of the cluster which contains the array of floats. I converted the cluster into a variant and used that to create the user event reference. Followed the same logic while decoding the dats.
But still the crash.... Here is the windbg output...
ModLoad: 07580000 075b7000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvalarms.dll
ModLoad: 0ca90000 0cb72000 C:\Program Files\National Instruments\LabVIEW 2012\resource\mesa.dll
ModLoad: 0c7f0000 0c7f9000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvuste.dll
ModLoad: 35000000 3509b000 C:\Program Files\National Instruments\Shared\TDMS\tdms.dll
ModLoad: 0c860000 0c87c000 D:\SapphireViewer\dll\SapphireClientDll.dll
ModLoad: 0e240000 0e2c7000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCP80.dll
ModLoad: 0e2d0000 0e36b000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCR80.dll
(1cb0.1a34): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0e47f8b4 ebx=051f0040 ecx=051f0040 edx=061e5764 esi=22820840 edi=07b10040
eip=03c2050c esp=0e47f5cc ebp=0e47f810 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\National Instruments\LabVIEW 2012\resource\tdcore_12_0.dll -
tdcore_12_0!LvVariant:etContents+0xac:
03c2050c 837e3100 cmp dword ptr [esi+31h],0 ds:0023:22820871=????????
I cannot really tell whats going on. Looking for some pointers.
Regards,
Abel. -
Workflow in event queue based on a deleted object
Hi all,
I'm facing a problem with a workflow that goes to the event queue, meanwhile the object is deleted and then the WF is released from the event queue in Error. The WF is based on the BO BUS2032 (sales order).
Here are the steps:
1-Sales order created or changed --> event generated --> WF linked to that event goes to event queue
2-Meanwhile the WF is the event queue waiting to be released, the sales order is deleted
3-The WF is released from the event queue but in ERROR status (this is because the BO instance does not exist anymore)
In this scenario, is there a way to end the WF with CANCELLED status instead of ERROR? is there anyy FM or exit you know ehere I can check if the BO still exists once the WF is released from the event queue?
Thanks!!!!!Some questions/options:
1) How/why does the WF go into an error exactly? Does it try to complete the first step? What if you put a condition step as a first step in the WF and check whether the object is initial and if it is, then cancel the workflow.
2) How about deleting the event from the queue from some user-exit/badi in the sales order deletion. If I remember correctly the events when queued are in table SWEQUEUE. Probably you can find some function to delete events from the queue. Take a look for example function SWE_EVENT_QUEUE_DELETE to see the idea. Or take a look into transaction SWEAD. There you can delete events from queue. Check what it does and do the same in your code.
3) Is this really a big problem? Are there so many sales orders deleted?
In general I think that the whole event queue seems to many times cause lots of problems (the event queue job disappears, WFs will not get started, and whatever.). I try to avoid using it.
Regards,
Karri -
Flush Event Queue doesn't work with "Key up"
Hi,
probably just a simple thing I am missing here. See the attached VI (including SubVI). In case 1 I fetch the Key Up event for ENTER and issue a Value Change on the Stop Button. This results in a check for the string length and in case it is too short brings up a dialog telling you the ID string is too short and brings you back to the ID entry. Unfortunately - when confirming the dialog with ENTER instead of using the mouse on the button theKey Up event fired again and therefore fetched by the Event Structure.
So I thought I just flush all events in the queue. To be sure, I put a time value on the flush function which proceeds AFTER the dialog is completed, so the ENTER Key Up should be deleted as well. Bummer is - it doesn't work. Anyone know why?
I tried as well with the dynamic event, which I unregistered right after the Stop Event is issued in the Key Up case. I then "re"register for the Key Up event at the same time/position as the flush event queue function is positioned now in the VI below. Still no joy.
What is my mistake? Thanks a lot.
Solved!
Go to Solution.
Attachments:
Manual_ID_Entry.llb 47 KBcomrade wrote:
I don't understand 2 things:
a) Why is the Key up event even fired? It doesn't come from the VI where the event structure resides and to which "Instance" the event is bound (VI->Key up), but from the dialog box (which is a different VI). Unless a calling VI inherits all events from its SubVIs or something like that.
b) Why isn't the event fired by the button in the dialog box discarded as the flush event queue function is supposed to perform?
Because you are slow. Not you personally. But compared to the computer, you just don't stand a chance. So you hit the Enter button on the dialog. That dialog's OK button activates on the key down. So the dialog is long gone by the time you manage to get your finger off of the Enter key. In fact, you loop should be back around to be waiting for an event first. So it is waiting for an event when you finally get your finger off of the button. Hey, we have a Key Up event!
Your current checking for the validity of the id is just flat out annoying. Use the Key Down? event to check for a valid character being entered. Notice the '?' in my choice of event there? That means it is a filter event. This means you can throw away (discard) the character being pressed before the control even sees it. You could also discard if there are already enough characters (Greater Or Equal, not Equal).
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Maybe you are looking for
-
Like, every time I hit recover, it tries to contact the server or whatever and then it can't find it. The screen is stuck with the iTunes and the USB cable thing on it. Somebody please help me! Do you think if I take this to Radio Shack where my mom
-
I'm new to the mac and imovie, enjoying both, but have hit a problem in my first movie. When I try to add transitions to clips I am getting a message warning that there is not enough memory to complete the activity. I have closed and reopened the app
-
Select all paths of a specific color in one document
Hi, I'm on Illy CS2, windows xp. I want to open a doc, run a script that selects all paths of a color, say 255,0,0 or 50,0,20,4 and changes that color to black or another color I specify and also changes the stroke. Is this possible? I can't see how
-
Brand New Machine New Harddrive New Everything I downloaded Firefox, installed it now this happens. I have also removed and reinstalled firefox to attempt to fix. please help.
-
Is it possible to attach the Response file to the Email notification?
Is there any way to send the Response file, in xls format, as an attachment to the Email notification?