Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ir camera + labview

more on what i want to do .                  i want to use the commands that are listed in the manual of the camera through labview to communicate with my instrument. i just want labview to read the temperature automatically once i run the vi and not querying for every single temperature value.
0 Kudos
Message 11 of 18
(2,272 Views)
OK, slow down, Kimosabe.

First, I don't know anything about your camera, how it works, or what its commands are, so I can't tell you what commands to send. So in your description of the way it scans and stores temperature... well, that's nice, but how does that translate to available commands to get this information? You have the manual, what does it tell you?

Second, the Instrument Driver Project Wizard is for LabVIEW 8, not 7.1. The Instrument I/O Assistant is something else. That installs an item in your function palette. If you want to use this, to access it:
  1. Create a new VI.
  2. Switch to the block diagram.
  3. Right-click on the block diagram and go to "Instrument I/O", and then select "Instrument I/O Assistant". Place this on the block diagram.
  4. Wait for the Assistant to start up.
  5. From here you can create steps to communicate with the instrument.
Do you have to use the Instrument I/O Assistant? No, you don't. It simply provides a convenient all-in-one block to perform an operation or set of operations on an instrument.

Attached is a simple sequence that sends a command and reads the response. This is done using VISA. As you can see, it's pretty straightforward.
0 Kudos
Message 12 of 18
(2,270 Views)

the camera manual just gives me the commands for example  ST6^  for reading the emissivity,  CR for reading the condition data, something like RT for read temperature,  also similar commands for moving the cursor on the screen for getting the temperature of specific pixel, etc.

0 Kudos
Message 13 of 18
(2,265 Views)
Well, you're not going to get very far unless you actually try the commands... Take the VI I gave you, set the value of the VISA resource control on the front panel to the address of the camera (change the "4" to the address of your device, or click on the down arrow to pull down a list of devices seen on the bus), set the string that's being fed to the VISA Write to "RT" (your read temperature command) and run the VI. What do you get in the read buffer output?
0 Kudos
Message 14 of 18
(2,258 Views)


thanks for that. i am able to read the temp from the IR camera device.

now i have to figure out how to do it in a loop.

can u tell me what an empty path constant (the one with an anchor symbol) means?  i read the help but it did not make any sense to me

0 Kudos
Message 15 of 18
(2,043 Views)
An empty path constant means... an empty path constant. I don't understand the question. If you click on the "Detailed Help" link in the Context Help window it says it can be used as a starting point for building paths. Whether or not you need this depends completely on what you're trying to do.

I would strongly recommend that you spend some time going through the LabVIEW tutorials and going over the NI Developer Zone's Learning Center to gain some familiarity with LabVIEW programming before delving too much into this. You will greatly reduce your frustration level and eliminate wild goose chases due to a problem with incorrect programming, rather than instrumentation issues.
0 Kudos
Message 16 of 18
(2,031 Views)

i used the sample gpib.vi and modified it just a little bit for my application.

here is what i want to ask. the image file and the vi is attached.

the command ST1^ gives the status of the device. if the read buffer output is "1" then it is in freeze status and if "0" then it is in run status.

i have used a case structure to check the output in the read buffer and produce a result accordingly

when i attach the read buffer output to the selector terminal it always executes the default case even if the  value is "1" or "0" (string).

But when i connect a separate string control (input case selector) instead of read buffer  and change the values manually. it works fine. why is this happening

Download All
0 Kudos
Message 17 of 18
(1,995 Views)
The read buffer probably has a carriage return or a linefeed along with the "1" or the "0". If you right-click on the "read buffer" and select the '\' codes display option and run the VI you will probably see something like "1\n" or "1\r" or "1\r\n". That means the instrument is appending a (respectively) linefeed, carriage return, or carriage return and linefeed to the actual response. You need strip this before feeding it to your case structure. You can use the "Match Pattern" function or the "Search/Split String" function. Example:



Note: If the return value is a number you can simply feed the "read buffer" to one of the string to number conversion functions to get a number. These functions automatically handle these characters.

Message Edited by smercurio_fc on 06-13-2007 08:50 AM

0 Kudos
Message 18 of 18
(1,989 Views)