LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event communication between application instances

Hi, I am trying to implement event/queue communication between two application instances (event one way, queue the other).  This works, sort of, but the problem is that I am getting an error 1: Enqueue Element in IPC_ReceiveMessage.vi->IPC_ReceiveMessage.vi.ProxyCaller on the return which LV says is probably caused by an input parameter being invalid.

 

I have 2 basic VIs:

IPC_SendMessage.vi

IPC_ReceiveMessage.vi

 

and then there are others around them who use these for communcation.  Thing is, sending the initial communication between one to the other works. But when I send for the other to the one, it fails with this message. 

 

My question is, does the communication between application instances allow for process 1 to send to process 2 and then process 2 to send to process 1 BEFORE process 1 is done its call?  I.e. does LV allow for multiple simultanious connections via the TCP/IP VI interface?  I'm wondering if this is the cause of my greif. I don't see anything to stop the same VI being executed on seperate processes.

 

Process 1            Process 2

send        -------->   receive

   |                             |

receive      <-------     send

   |                             |

receive done               |

   |                       send done

send done                  |

                           receive done

 

I'll post some test code a bit later when I have it more simplified. 

 

Thanks,

 

 

Adrian

0 Kudos
Message 1 of 3
(2,451 Views)

Hi, here are the VIs.

 

IPC_SendMessage.vi - sends the message

IPC_ReceiveMessage.vi - receives the message

IPC_TestServerProcess.vi - test application

TestServerClient.bld - build file

Server.ini - enables TCP access and specifies the port as 3360

Copy of Server.ini - enables TCP access and specifies the port as 3362

 

To run test:

- Build Server.exe using TestServerClient.bld

- Create a copy of Server.exe with name Copy of Server.exe

- Run Server.exe, move window else where.

- Run Copy of Server.exe (this will popup in same place as where Server.exe opened up, and is why I said to move Server.exe window else where).  Change the port number to 3360.

- Type in Message.Command something in one of the servers and click send.  The other server should get the command in the ASSR Algorithm User Event box.  This should work the other way as well.

- Timeout values: -2 don't wait for a reply. -1 - wait indefinitely for reply, 0 or greater, wait for specified ms for reply.  The reply will be the text in the other server's Message and placed in the Response of the caller if Reply /w send event is false.  Otherwise it will be placed in ASSR Algorithm User Event.

 

 

Issues I'm seeing:

- Erratic behaviour.  I press the send button and sometimes I have an invalid reference.  Click it again and it may fix itself. 

 

I was originally thinking that my prob was caused by number of open connections allowed on the server.  Now I don't know what it is caused by.

 

 

Oh, BTW, I am using LV 7.0

0 Kudos
Message 2 of 3
(2,426 Views)

Here it is again with a slight mod where it will check what port it is on and change the port that it is sending to accordingly.

0 Kudos
Message 3 of 3
(2,410 Views)