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.
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.
10-10-2018 06:32 AM
Hi All,
I was wondering if someone could help me in providing an example which depicts two VI' calling each other via creating a User event.
I have a scenario where a server listens to a client who sends a String. As soon as I read the String via a TCP read in my server, I need to call another VI via an Event to use that String (from server), perform some operations. Then after send a Message back so that the server via TCP send the exact message to the client.
I have an implemented server which as of now can manage READ and WRITE (attached), but I cannot manage to call other VI and receive its message. A little help could be very appreciable.
Thanks
RG
10-10-2018 07:46 AM
I can't open your vi, because I haven't LV18
Here only draft of communicate between two loops. Both of them can be a subVI (except Panel close event)
10-10-2018 07:55 AM
Thank you for your reply. However, I am still in doubt with, how to connect if these two (string processor and server) are a different VI files?
That is one main problem for my case.
Regards
RG
10-10-2018 08:08 AM - edited 10-10-2018 08:09 AM
@erraunakgupta wrote:
Thank you for your reply. However, I am still in doubt with, how to connect if these two (string processor and server) are a different VI files?
That is one main problem for my case.
Simply select the loop or sequence (either one), and select Create SubVI. That would give you the sub VI with correct inputs. Not that you should do it like that, but examine the result, and learn how to do it that way.
10-10-2018 08:26 AM
@erraunakgupta wrote:
Thank you for your reply. However, I am still in doubt with, how to connect if these two (string processor and server) are a different VI files?
That is one main problem for my case.
wiebe@CARYA have sad the 1st way create subVI
also you can configure Create User Event vi and after that right-click on "user event out" terminal, select Create indicator and you'll get correct indicator for your subVIs
10-10-2018 08:54 AM - edited 10-10-2018 08:55 AM
You don't need a connection between the server and client. Both get the same events, one uses them to send, the other to receive.
Of course one or two channel wires will do the trick as well. That would actually look like a connection, and might therefor be more intuitive for the OP.
10-10-2018 08:57 AM
The client here is not a Labview Vi but an external software which connects to an open port.
10-10-2018 08:59 AM
@Artem.SPb wrote:
I can't open your vi, because I haven't LV18
Here only draft of communicate between two loops. Both of them can be a subVI (except Panel close event)
Just to clarify, the sequence frames are not actually needed. Other than identifying each section of code they serve no purpose in the code as the wires will control the actual sequencing of code execution.
10-10-2018 09:02 AM
@erraunakgupta wrote:
The client here is not a Labview Vi but an external software which connects to an open port.
I mend two channel wires between the two loops. Where the current running example uses user events. Replace each user event with a channel wire.
I'm not suggesting a channel wire as a replacement for the TCP\IP communication. That's not possible (at the moment), even if the other device is running a LabVIEW program.
10-10-2018 09:05 AM
You've asked about LV-event and haven't say about "external software".
You can't use user-events for communicate between 2 apps, even if both are LV-apps.
So, say real and full structure of your "system"?