Search waiting | Matsusada Precision

Searching...

Technical Terms

A Return value is the data sent back to the calling program after a function or subroutine completes its execution. In instrument control programming, return values are essential for acquiring measurement data, verifying device status, and confirming command execution. While some functions perform actions without returning data (often indicated by a void type), most remote interface operations rely on return values to ensure reliable communication.

For example, a control function like SetVoltage(5.0) typically returns a status code or acknowledgment to confirm the command was received successfully. Conversely, query functions are designed specifically to retrieve data. A function such as MeasureCurrent() returns the actual output value as a floating-point number (e.g., in Amperes). The host program stores this return value for data logging, analysis, or automated decision-making. Correctly handling the specific data type--whether integer, string, or boolean--is critical for stable system integration.