08-30-2010 07:20 AM
Hi,
How can I ask the I2C device alias name which MAX uses in Labview? If the VISA Alias on My System is for example I2C in MAX, I need to ask it in Labview and write it then to Device Reference In input of a I2C vi.
BR,
Jick
Solved! Go to Solution.
08-30-2010 09:48 AM
I am not exactly clear about your question, but you can get the correct VISA reference by using a VISA control on your front panel. If you then click on it the "pull down" list will show all of the VISA aliases on that system.
08-30-2010 09:56 AM
Assuming you are referring to the NI-8451, VISA doesn't even come into play with the I2C device, so I'm not sure why you'd be trying to use it. The 8451 installation adds a new control to the I/O palette called "NI-845x device". If you do have the 8451 have you looked at the examples that ship with it? If you are not using the 8451 then what do you mean by writing it to the "Device Reference In" input of an I2C VI?
08-31-2010 01:43 AM
Yes, I am using the NI-845x v.1.1.1. This version does not automatically recognize the NI I2C/SPI Interface device. That is why I have to give an alias name for that device in MAX and use the alias in LV.
My question was that can I somehow ask that aliasname in my LV code and after that I would use that name as the device resource name in LV?
However I could not find any solution for this. Instead of it I used VISA Find Resource vi which gave me a list of the interfaces including the serial number of my device. I used same serial number of the Device as alias in MAX. So I got it work!
BR,
Jick
08-31-2010 05:13 AM
I am still interested in to find a solution for the original problem...
BR,
Jick
08-31-2010 08:17 AM
Here is a picture which should clarify the problem a bit more.
As you can see I use "I2C2" as an alias in MAX and I need somehow query that alias in Labview and write it to the device reference in input node. How?
BR,
Jick
08-31-2010 08:47 AM
08-31-2010 08:49 AM
I am using Labview 8.0 and I am not sure if it is possible to use later version than v.1.1.1 with it?
BR,
Jick
08-31-2010 09:02 AM
I am using Labview 8.0 and I am not sure if it is possible to use later version than v.1.1.1 with it?
Well, that's a problem. v1.1.1 is the last version that supported LabVIEW 8.0.
@Jick wrote:
Here is a picture which should clarify the problem a bit more.
As you can see I use "I2C2" as an alias in MAX and I need somehow query that alias in Labview and write it to the device reference in input node. How?
Does it work if you manually enter "I2C2" in the device reference control?
08-31-2010 09:23 AM
Yes, but I have to automatically recognize which I2C device is connected and write its unique alias name into the device reference in input node.
One solution is to use VISA Find Resource vi, parse the serial number out from the string array and use that serial number as an alias name in MAX. But how can I convert a serial number string to the device reference in type? I can't wire it directly because it gives me an error when I run the VI.
BR,
Jick