07-11-2012 12:00 PM
I am trying to write a program that would control a pump and a heater with a fast ethernet switch and a netBooter. I need LabVIEW to turn the power outlets on the netBooter on and off. So first of all LabVIEW needs to identify the netBooter. I used VISA Find Resource to search for the instrument, but it found two things: ASRL1::INSTR and ASRL10::INSTR
How do I read these strings and find out if they are referring to the fast ethernet switch or the netBooter?
07-11-2012 12:16 PM
Those are the Com1 and LPT1 ports so unless your instruments are connected to one of those, you are not doing something correctly. You need to fully explain the physical connections that are present.
Your code has nothing to do with your question.
07-11-2012 12:21 PM
Sorry, I attached the file with unsaved changes.
07-11-2012 12:26 PM
Many (not all) instruments will respond to an "*IDN?" query. Just send that string to the instrument and read the results. If this is supported by your instrument then it should return the manufacturer and model number of the device.
07-11-2012 12:35 PM
There is a patch cord connecting the computer to the ethernet switch and another connecting the ethernet switch to the netBooter. We can turn the netBooter power outlets on and off with HyperTerminal, but we need to do it with LabVIEW so that we can control the temperature of a water tank.
07-11-2012 12:56 PM
When dealing with network devices there aren't easy options for dynamically finding the devices you need. You need some type of protocol in order to find them. One method would be to use predetermined names and use a DNS lookup to find the IP address associated with the device. From there you can attempt to query th edevice and see if it is actually available. Other devices may support a discovery protocol. However this is very dependent on the device itself. For example, the printers my company make support a discovery protocol. If they receive a broadcast discovery message one a specific UDP port they will respond with identification data. This data is in a proprietary format. The devices you are working with may do the same. Or if you are developing them it could be something you consider doing.
07-11-2012 01:23 PM
If you have statically assigned an address to netBooter, then you can simply do a TCP/IP Write, just like Hyperterminal.
07-11-2012 01:25 PM
@Dennis_Knutson wrote:
If you have statically assigned an address to netBooter, then you can simply do a TCP/IP Write, just like Hyperterminal.
Yes, a configuration file containing the information is always an option. I was given the impression they wanted something more dynamic.
07-11-2012 01:30 PM
I got the impression that they did not really have a clue since they were using the VISA Find Resources.