04-27-2012 12:24 PM
I have a 9265 analog out unit in a 9191 chassis.
Can I use the IP address in the name of the physical channel in the call to DAQmxCreateAOCurrentChan?
For instance, "192.168.1.4/ao0".
I thought I saw this somewhere in the documentation, but it does not work.
Is this possible?
Solved! Go to Solution.
04-30-2012 03:09 PM
My first answer will be no, as the Create Channel VI uses the Alias that the device has in MAX to create a reference, and you can not put the IP address as the device name as MAX does not allow you to do that. Can you tell me where did you find that information??
04-30-2012 03:27 PM
I'm not sure where I saw it, and I can't find it again, so probably I am mistaken.
In the MAX program, the help string for the 'Hostname' says:
Enter a name for the remote system. This field is limited to 31 characters and can contain only alphanumeric characters and hyphens. The name cannot start or end with a hyphen. If you do not enter a name, the remote system is identified in the configuration tree by its IP address.
which implies that it will use the IP Address for the device name?
05-01-2012 11:11 AM
To add to Mart's post, the restriction on hostname contents is one that is chosen for best compatibility with network naming systems. See here for some more background; excerpting:
The Internet standards (Request for Comments) for protocols mandate that component hostname labels may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). The original specification of hostnames in RFC 952, mandated that labels could not start with a digit or with a hyphen, and must not end with a hyphen.
If you modify the hostname of a cDAQ-918x/919x chassis before you Add it to the system (via DAQmx Add Network Device or in MAX), the DAQmx Device Name will be assigned as the hostname and can be addressed using DAQmx I/O controls in LabVIEW. This might be useful to you if you are choosing descriptive hostnames (e.g. "PumpRoomChassis1"), but you still wouldn't be able to assign the IP address as the hostname.
One other technology you might be interested in for correlating IP addresses and hostnames (and, by extension, DAQmx names) would be the NI System Configuration API. This article links to some other references for the NI System Configuration API.
Hopefully this helps-