LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interprocess communication, socket, pipe, MQ

Dear All,
 
I am writing a LabVIEW program (process) that shall communicate with another program (process) to be written in Microsoft Visual C by another team member
 
a) both process run on same PC
 
b) the VC program sends command to the LabVIEW process. The command is about 30 bytes. May be the simplest way is to have the VC process send it as ASCII string and let the LV chop it up into fields. 
 
c) the LabVIEW process will execute the command, capture an image via IMAQ and save the image data in a file 
 
d) the LV will send a reply to the VC process to signal the success or failure of the command
 
e) timing delay for the command and reply need to be about 20 to 100ms on Intel 2.8GHz PC
 
What are the common type of Interprocess communication mechanisms (TCP/IP socket, WinSocket, Message Queue, named-pipe, etc.) that are supported by both LV and Microsoft VC?
 
Which of these are event driven (save constant polling)?
 
Can two process on same PC (may be using 127.0.0.1 as local IP) use TCP/IP socket with different ports to communication with each other? (one port for VC and one port for LV process).
 
 
0 Kudos
Message 1 of 5
(6,092 Views)

Hello,

TCP/IP should work, and it sounds like perhaps you can build your LabVIEW code into a dll.  At first glance, it seems that requirements c and e may be incompatible.  That is, the part which may be the bottleneck is that you want to do everything in 20-100ms, but it sounds like between your command and reply, you need to "capture an image via IMAQ and save the image data in a file" - this may take longer than that, especially with the rest of the inter-app communication overhead.  Have you asked about this in an IMAQ thread already or tested it in your system?  You may also want to test simple inter-app communication, say TCP/IP, to get an idea for how long those processes take as well, to see if you can even meet your requirement e.

Best Regards,

JLS

Best,
JLS
Sixclear
0 Kudos
Message 2 of 5
(6,081 Views)
Just another resource... the following post may contain some useful information - specifically the parts discussing the affects of firewalls o
Best,
JLS
Sixclear
0 Kudos
Message 3 of 5
(6,076 Views)
Just another resource... the following post may contain some useful information - specifically the parts discussing the affects of firewalls on
Best,
JLS
Sixclear
0 Kudos
Message 4 of 5
(6,078 Views)

(continued)

performance of TCP/IP.  Here's the link for reference:

http://forums.ni.com/ni/board/message?board.id=180&message.id=14935&requireLogin=False

I hope this helps!

JLS

Best,
JLS
Sixclear
0 Kudos
Message 5 of 5
(6,075 Views)