11-11-2010 10:18 AM
I'm totally new to LV but have managed to write a TCPIP client successfully. My only problem is that once my tcp OPEN Connection VI is running, how to check it status. I need to know this as I want to use the TCP ID if already opened, else create a new connection.
Thanks
Cape Town
11-12-2010 01:19 PM
Can you please explain what you mean by "check the status"? Also what module or VIs are you using to accomplish your task?
11-14-2010 10:10 PM
Hi
I'm using LV 2009 with the "\Datacommunications\Protocols\TCP" palette function.
The "TCP Open Connection" function is the one I'm enquiring.
I'm trying to rewrite a DotNet DLL with native LV. In the DLL, I create a TCP connection once. Then I create 7 classe instances using this connection.
As I can query the TCP connection's status in the DLL, it is important to do this in LV.
Thanks
11-15-2010 11:31 PM
Can you give me more details on what you are trying to do because I am little confused. You mentioned checking status of TCP connection, I am not sure what you mean there? Also, you mentioned editing a .NET DLL file within LV, which is possible.
Give me the big picture, and hopefully I can lead you the right way.
11-16-2010 01:10 AM
Hi
Coming from C#, let me explain how the DLL works.
My hardware includes 2 Rabbits (MCU from RabbitSemiconductors), each of them running a TCPIP Server-based app.
Then I have 7 Harps (Cyclotron current measurement equipment), all housed with the 2 Rabbits, one serving the X-plane and the other the Y-Plane.
The Rabbits can switch between each Harp via a multiplexer.
Now the .NET DLL creates 2 TCPIP connections, one per Rabbit.
Then it creates the Harp classes, which will be 7. They are then linked to the socket connections.
When the DLL is called to create a Harp, it checks to see if there is 2 valid connections and if not , creates them, else it uses the existing connections.
We have written a working system using this .NET DLL inside LV. Now they want us to rewrite this functionality using LV's native TCPIP classes.
I have subsequently read about GOOP and general OOP programming in LV, hoping to somehow get a similar class hierarchy in LV.
But my inexperience in basic LV knowledge has been frustrating as I don't know how the check if a TCPIP connection exist and running or not.
I have attached the VI's and subVI's.
You can see in Test_Rabbit2.vi I'm calling subvi "Harp_Init2.vi", who calls subvi "LVRabbit.vi".
The problem is that I need to call "Harp_Init2.vi" seven times, which will call "LVRabbit" seven times. Therefore I need to check if the 'TCP Open connection' is already opened or not.
I hope this info will be sufficient to explain to you my problem.
Thanks.
Amien.
Cape Town
11-17-2010 11:08 AM
Hey,
I believe you could try testing whether there is a connection by checking the error cluster on an open TCP connection, no timeout error means that the device is available at that IP address.
I hope this helps!