Jump to content

Communication between projects


Recommended Posts

Hi all,

I am wondering how to send messages between different projects. It seems (from the little testing I tried) that notifiers and semaphores cannot be passed between projects. So I am wondering what is the mechanism for doing this, or should I develop everything that would want to communicate within the same project.

Thanks,

EOF

Link to comment

The easiest way to communicate between projects is using VI Server, for which there is plenty of documentation in the LabVIEW help. Each project is its own "Application Instance" and there's some information about how to get a reference to an application instance in this thread.

Link to comment

Hi all,

I am wondering how to send messages between different projects. It seems (from the little testing I tried) that notifiers and semaphores cannot be passed between projects. So I am wondering what is the mechanism for doing this, or should I develop everything that would want to communicate within the same project.

Thanks,

EOF

Yes, you need some sort of message-passing mechanism if you use different projects, since you are communicating now between two different applications. Networked shared variables (used properly and on a supported platform) offer a good solution for this, but you can also use TCP/IP, UDP, or the like. You might try looking at the Simple Messaging Reference Library (STM) on NI's site. If I faced the same problem (and I do) I would use networked shared variables for this purpose, as they probably offer the most flexible and most easily configurable solution (and with the DSC module we can add logging and alarming functionality).

If your applications are on the same machine you can use .NET or a Windows message service, but the former is not very efficient and the latter is quite nontrivial (and both require Windows).

You also can use a web server, which is at least platform-independent, but your message timing and delivery reliability will suffer.

Will your applications always run on the same computer? What requirements do you have for message timing and delivery?

You could also consider building one project's top-level VI into an application (e.g., .exe, .dll) and exposing calls to the other application.

Or you can import one project into the other (which it sounds like you have considered) and if you can build only one application you can still use notifiers and semaphores. This can be a very simple solution and will work well as long as your applications run on the same computer (or a desktop and a cRIO or the like). In the current version of LabVIEW you can't add two desktop computers to a project, and you can't use queues and the like over a network anyway.

Hopefully I've said everything correctly but my descriptions may not be 100% correct.

I suggest using networked shared variables offers the most flexibility and offers one of the best performance options, too.

Paul

Link to comment

Mike,

STFF man! (search the freaking forum)

Someone came up w/ a very similar way as REx to use queues over a network or at least that's what I found on lava search.

Is this what you're talking about?

It refers to an attached file, but I don't see one. Michael, did attachments not port from LAVA 1.0?

Link to comment

Is this what you're talking about?

It refers to an attached file, but I don't see one. Michael, did attachments not port from LAVA 1.0?

Most of them did. It looks like this one fell through the cracks. I have all the files and I have a manual way of associating them to the original post, but it takes some effort. If anyone has a copy on their computer then please attach it to that thread. I will look later to see if I can find the file.

Link to comment
  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.