Hi,
You don't necessarily need to use the callback functions, it depends on the attribute and its relation to the actual instrument. An attribute is simply a variable handled by the IVI engine. You access the variable using the Ivi_SetAttribute and Ivi_GetAttribute functions. Without callbacks you are just changing the attribute value in memory.
Usually, attributes reflect a setting or parameter in the instrument. The callback links that abstract representation (the attribute) with the actual device. Most IVI drivers implement the instrument I/O in the callback functions. The IVI engine handles the callback functions.
For example, define an attribute named RANGE. Without any callback functions, you can read and write to the attribute, but you are changing its value in memory. The IVI engine doesn't know how to tell the instrument to set the new range. That's where the callbacks come in. You define a write callback for the RANGE attribute. This function will send the appropriate commands to the instrument to set the range. When you call Set attribute RANGE, the IVI engine write the new value in memory and calls the callback function, which will do the actual instrument I/O.
>> Another question: what is the syntax in the write command "writeBuffer" in the Prefix_WriteInstrData (ViSession vi, ViConstString writeBuffer)? Does it exist an universal convention ? Where can I find information please ?
There is no universal syntax. Every instrument has a diferent command set. Instruments of the same manufacturer and family will most likely use the same commands. The ultimate reference is the instrument's User Manual.
>>Last question : Do the same IVI functions work for GPIB, RS232 ...? In this case, I need to develop only one driver ?
Use VISA. The VISA specification provides a standarized API for instrument I/O. Using VISA you have the option to use the driver with different buses and interface vendors.
Hope this helps
DiegoF
National Instruments