Specifications

Custom EU/Function Example
eufn1419.vee: This program operates stand-alone. It is designed to show how easy
it is to generate complicated EU conversion and Custom functions by simply
entering in channel numbers, function names and algebraic expressions. Need to
convert volts to pressure or perform a square-root operation? Use this program to
see how easy it is to perform.
This program illustrates how to generate a sine wave from a custom function that is
then used to program an analog output. The analog output (channel 132) is assumed
wired to analog input channels 100 and 101. Channel 101 is the straight voltage
from channel 132 and channel 100 is the same voltage but processed by the EU
conversion formula for channel 100, as defined in the CustomEUDeclarationArray.
The EU conversion formula simply takes the voltage read from channel 100, takes
its absolute value and divides it by 2.
Notice that the domain of the sin_radians() function is limited to 0-6.3, which
represent a 0-2*PI interval. Each time the algorithm executes, it writes the new
value of O132 based upon the sin_radians() function with the passed parameter
“inc.” The “inc” parameter is incremented once for each trigger since each trigger
VEE Programming Examples
Custom EU/Function Example
158 Chapter 5
Figure 5-10: Custom EU/Function Example Detailed View
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com