07-16-2007 09:42 AM
07-17-2007 08:45 AM
07-17-2007 07:37 PM - edited 07-17-2007 07:37 PM
VISA Find Resource function does enumerate the active GPIB addresses and available Serial (COM) ports, but the conditions are different between GPIB and Serial. The found GPIB resources are what truly connected online, but found Serial resources are the ones just recognized by OS. For example, if your PC equips COM1 port and Windows recognizes it, the Find Resource function always include "ASRL1::INSTR" in the enumeration result even if the instrument is disconnected. To check the existence of instrument on Serial port, you must perform real I/O operation such as send *IDN? and receive its response.
The other solution for deciding actual VISA address at runtime is use "Alias" feature of VISA. By using it, your app only need to design to include an "Alias" address such as "DMM1". At runtime, adjust VISA alias configuration for the target PC by using NI-MAX such as mapping the alias address to "GPIB0::1::INSTR" or "ASRL1::INSTR" or any you want.
このメッセージは 07-18-2007 09:39 AMに Makoto が編集しています。
08-06-2007 12:27 PM
08-06-2007 01:46 PM
08-06-2007 02:26 PM