Section 8. Processing and Math Instructions
8-30
The Sin function takes an angle and returns the ratio of two sides of a right
triangle. The ratio is the length of the side opposite the angle divided by the
length of the hypotenuse.
The result lies in the range -1 to 1.
To convert degrees to radians, multiply degrees by
π
/180. To convert radians
to degrees, multiply radians by 180/
π
.
Returns the sine of the value in parentheses. The input must be in radians.
Sin Function Example
The example uses Sin to calculate the sine of an angle from a Volt input.
Dim Degrees, Pi, Radians, Ans
'Declare variables.
Pi = 4 * Atn(1)
'Calculate Pi.
Degrees = Volt(1)
'Get input.
Radians = Degrees * (Pi / 180)
'Convert to radians.
Ans = Sin(Radians)
‘The Sine of Degrees.
SinH (Source)
The SINH function returns the hyperbolic sine of an expression or value.
Syntax
x = SINH( Expr )
Remarks
The SINH function returns the hyperbolic sine [ SINH(x) = 0.5( ex - e-x ) ] for
the value contained in the Expr argument.
The example uses SINH to calculate the hyperbolic sine of a voltage input.
Public Volt1, Ans
'Declare variables.
BeginProg
Scan ( 1, min, 3, 0)
VoltDiff(Volt1,1,mV5000,1,True,100,500,1,0)
'Returns voltage on Channel(1) to Volt(1)
Ans = SINH( Volt1 ) 'The Hyperbolic Sine of Volt1.
NextScan
EndProg
Sqr (Source)
Returns the square root of a number.
Syntax
x = Sqr (number)
Remarks
The argument number can be any valid numeric expression that results in a
value greater than or equal to 0.
Returns the square root of the value in parentheses.
Содержание CR5000
Страница 39: ...Section 1 Installation and Maintenance 1 15 S A N Y O FIGURE 1 11 6 Removal of band clamp and battery ...
Страница 40: ...Section 1 Installation and Maintenance 1 16 This is a blank page ...
Страница 54: ...Section 2 Data Storage and Retrieval 2 14 This is a blank page ...
Страница 88: ...Section 4 CRBasic Native Language Programming 4 12 This is a blank page ...
Страница 94: ...Section 5 Program Declarations 5 6 This is a blank page ...
Страница 172: ...Section 7 Measurement Instructions 7 46 This is a blank page ...
Страница 206: ......
Страница 236: ...Index Index 4 This is a blank page ...
Страница 237: ...This is a blank page ...