From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a event from C code that LabVIEW can capture

Has anyone generated C++ code that generates an event that LabVIEW captures and processes (preferrably in the event structure?)
 
John
0 Kudos
Message 1 of 3
(2,416 Views)

Just to give more details.  What I want to do is create a service in C++ that runs on one machine.  Then three other machines will "register" with this service to get updates from it. I would prefer that the updates be done via and event and be able to go right into the event structure.  I see there is an Register ActiveX Callback vi.  Would the only way be to have this generate a user event and monitor that from the Event structure?  Not sure why you have to go that way and not directly use the event structure.

 

John

0 Kudos
Message 2 of 3
(2,411 Views)
You can do this with the exported function from LabVIEW.exe: PostLVUserEvent.

I only succeeded in doing this when the function is called from the LabVIEW process. For instance, a dll that is called by LabVIEW.

The first parameter is a user event casted to I32. The second parameter is a pointer to the data. The function is called as a stdcall.

Regards,

Wiebe.
0 Kudos
Message 3 of 3
(2,403 Views)