Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
jsapi:introducing_getvalue [2025/04/30 03:05] optrix created |
jsapi:introducing_getvalue [2025/04/30 03:32] (current) optrix |
||
---|---|---|---|
Line 2: | Line 2: | ||
If you want to work with multiple data points at a time, we provide the [[GetValue|GetValue]] function. | If you want to work with multiple data points at a time, we provide the [[GetValue|GetValue]] function. | ||
+ | |||
+ | This function takes the name of the point you're subscribed to, and an optional default value to return if no value is available (if no default is specified, the function returns ' | ||
+ | |||
+ | ===Example=== | ||
Let's say we wanted to find the difference between the //actual// speed of our demo Paint Line, and the //target// speed it's supposed to be running at. | Let's say we wanted to find the difference between the //actual// speed of our demo Paint Line, and the //target// speed it's supposed to be running at. | ||
Line 20: | Line 24: | ||
//Be aware that during initial connection, some of the points of data might not have values, and the values from ' | //Be aware that during initial connection, some of the points of data might not have values, and the values from ' | ||
+ | |||
+ | ===Colouring and Naming=== | ||
+ | |||
+ | In some cases, you'll want to ensure you're using the [[right names and colours]] for your values. | ||
+ | |||
+ | Otherwise, you might want to continue to the [[HMITTPanel|HMITTPanel Class Reference]]. |