07-19-2012 10:26 AM
New firmware has changed the active UDP port to where information is recieved. I am looking for a way to poll one of the ports (lets say 824) and see if it is active. If it is i want to use this port, If it is not i want to use a different one. I am new to labview and confused on how to approach this. I am using Labview2011.
Thanks,
Rob
07-19-2012 11:28 AM - edited 07-19-2012 11:31 AM
@Rlf5104 wrote:
New firmware has changed the active UDP port to where information is recieved. I am looking for a way to poll one of the ports (lets say 824) and see if it is active. If it is i want to use this port, If it is not i want to use a different one. I am new to labview and confused on how to approach this. I am using Labview2011.
Your description is quite unclear.
If you are trying to connect to an IP/port elsewhere? Simply try both and see which one succeeds.
Alternatively:
Is your LabVIEW program trying to listen on one or the other port for incoming packets or something else?
UDP is connectionless so there is no way to tell "activity" unless a packet of the right format actually arrives. If both server ports on the local computer are unused, I would just listen on both in parallel, then use the one that receives data. Note that due to random internet noise (especially if it is a well known port), random packets could arrive at either port, so you somehow need to check if the payload corresponds to the expected data format.