07-14-2015 02:27 AM
Ok, I see the problem. In the sencod Reg Event the evetn sigLaserEnd was unwired from the automation refnum . Fixed. Now is connected.
How can I replace the boolean T with a triggered signal from the event?
07-14-2015 08:14 AM
@Stavrosyt wrote:
Ok, I see the problem. In the sencod Reg Event the evetn sigLaserEnd was unwired from the automation refnum . Fixed. Now is connected.
How can I replace the boolean T with a triggered signal from the event?
Great! Now my understanding is this: You manage to run your program and once the Laser on event triggers you set the LED to true. All this works, right?
My understand is, that you have to take a look at the Variant (the one you deleted when comparing your current program to the example you posted earlier). What is in that Variant when the Event triggers? You can try that out or have a look at the documentation for the laser's activeX Interface.
In terms of functionality, why don't you just use one LED and set it to true in the "On Event" and to false in the "Off Event"? That would do what you want: Indicate wether the laser is on or not, wouldn't it?
07-14-2015 08:39 AM
Hey again,
I manage to run my program, but it doesn't seem to work with the laser (althought no errors are displayed). Need to see when the event triggers....
The variant should be nothing because according to the laser documentation, sigLaserStart is a void signal [void sigLaserStart (void)].
Your solution using one LED could be a good idea, but then I need to be set to TRUE by the trigger event "LaserStart" and set to FALSE triggered by the event "LaserEnd", how can I do in that case? same user parameter reference for both reg event callback?
07-14-2015 09:22 AM
That would be my best guess. Since start and end are separate events, this might work.
I don't understand: Does the event trigger? have you been able to verify this?
07-14-2015 09:35 AM
No, how can I verify it? is there a simple way to see if the event trigger, and if it doesn't find where is the fail?
07-14-2015 12:46 PM
See when it triggers: Why don't you call a one button dialog within the Event VI? That would at least tell you if there was an event.
07-15-2015 04:08 AM
I will try that, but then this doubt appers:
which events should I manage with the Reg Event Callback, and which ones with a Case structure, or Event structure?
07-15-2015 04:29 AM
Nevermind, I see that ActiveX events should only be used with Reg event callback. And event structures for non-activeX events.
I will be trying if the events are triggered, but what about the leds ligthing?
07-15-2015 08:42 AM
Hi Peter,
I can't see the event is triggered at all. How can I debugged if the ActiveX is running in my program? or at least to debug step by step the program.
Here is the new main VI:
And this is what the VI ref block diagram looks like:
As you can see, there are already a TRUE constant at the LED value. But I can't see if the event is triggered or not even with the "One button dialog" inside.
Any more ideas?
07-15-2015 10:16 AM
hmm... that's strange... Does the laser switch on?
If I try this with the browser example that comes with labview it works.
So our logical next step would be to see why the event doesn't trigger.