LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using VI Server to read Registered Controls Reference (Event based)

Hi, I'm using Labview 2019,

 

Is there any chance that I can read Object from labview application using Event Based

which I already edit the file.ini by inserting these two (Using VI server between application):

server.tcp.enabled=True
server.tcp.port=3364

 Below, is the error i get at register event pallete

fendywoo_0-1576642377592.png

fendywoo_1-1576642510545.png

0 Kudos
Message 1 of 16
(3,734 Views)

Hi, please tell us a purpose of your application. What do you want to do?

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 2 of 16
(3,697 Views)

The things that I want to do is to create an application for a system contain of Data Acquisition Pressure Transmitter and Controlling Valve. In future there will be a need to export all those data to another PC server (OPC UA). Instead of me, have to disturb the program that are running 24/7. I can just tap the application using VI server and probably do some controlling using an Event Based (Value Signalling) from New Application (Read & Write OPC UA Client).

 

I'm thinking of future adjustment or changes without interfere the existing application running. 

0 Kudos
Message 3 of 16
(3,686 Views)

For example below?

(Main.vi) Acquired Data -- Any method --> Another PC --> (OPC VI) --> OPC Server

Can you allow data drop? Are you looking for a method such as Queue?

 

Or you do have a trouble on your VI? I didn't see the same error on VI. Should I build the VI into EXE application?

 

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 4 of 16
(3,664 Views)

Yes, you should build one.vi under exe. Then using another vi (in development Mode) to get access via VI server.

Require to add Server TCP in this link;
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LbZSAU&l=en-MY

0 Kudos
Message 5 of 16
(3,659 Views)

Even if you could do that (register for events in another application instance) it doesn't sound like a good idea.

 

Why not use a network stream? Or your own TCP\IP connection? Even shared variables would work...

0 Kudos
Message 6 of 16
(3,629 Views)

yeah I could do that, Shared Variable, TCP/IP, Network Stream but yet I still need to disturb the main.vi and do the Write Data Shared Variable ready, TCP/IP ready or Network Stream ready. I do see the potential of VI server as in vi between vi. I can make it event driven. But not in between application.

0 Kudos
Message 7 of 16
(3,626 Views)

@fendywoo wrote:

yeah I could do that, Shared Variable, TCP/IP, Network Stream but yet I still need to disturb the main.vi and do the Write Data Shared Variable ready, TCP/IP ready or Network Stream ready. I do see the potential of VI server as in vi between vi. I can make it event driven. But not in between application.


Is the goal to leave the main.vi executable undisrupted?

 

There are options... You can make a VI that catches the main.vi events. Drop this VI on the executable, and it will catch the events. The executable will be unmodified. The VI can then communicate the events in some other way. Even VI Server, but not the events.

 

This is on the hacky side of development. It will work, but I'd only use it if the I couldn't change the executable.

0 Kudos
Message 8 of 16
(3,616 Views)

I am not really sure what you end goal is but you could...

 

Serve-up a Wrapper around an Action Engine that can fire a User Event.

The Action Engine will have to have a reference to the User Event created in the context of the application that is going to register for the event.

 

See here for more insight into that approach.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 16
(3,586 Views)

I think (but please confirm or clarify) OP wants to register for events that happen in another application (exe). So outside the exe, you'd be getting dynamically register for events in the VI that lives in the exe.

0 Kudos
Message 10 of 16
(3,584 Views)