4MELFA-BASIC IV
Detailed Explanation of Functions
4-316
Cvd
[Function]
Converts the character codes of the first eight characters of a string into a double precision real number.
[Format]
[Reference Program]
1 M1=Cvd("FFFFFFFF")
' +3.30 is assigned to M1.
[Explanation]
(1) Converts the character codes of the first eight characters of a string into a double precision real number.
(2) An error will be generated if the string consists of seven character or less.
(3) Mkd$ can be used to convert numerical values into a string.
[Reference]
,
,
,
,
,
Deg
[Function]
Converts the unit of angle measurement from radians (rad) into degrees (deg).
[Format]
[Reference Program]
1 P1=P_Curr
2 If Deg(P1.C) < 170 OR Deg(P1.C) > -150 Then *NOERR
3 Error(9100)
4 *NOERR
[Explanation]
(1) Converts the radian value of an equation into degree value.
(2) When the posture angles of the position data are to be displayed using positional constants, the unit
used for ((500, 0, 600, 180, 0, 180) (7, 0)) is Deg. As in the case of P1.C, the unit used will be in radians
(rad) when the rotational element of the positional variable is to be referenced directly. Value of P1.C
can be handled in Deg. In such case, set parameter "PRGMDeg" to 1.
[Reference]
<Numeric Variable>=Cvd(<Character String Expression>)
<Numeric Variable>=Deg(<Equation>)