Mitsubishi Electric CR750-Q Instruction Manual page 426

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

4MELFA-BASIC V
CkSum
[Function]
Calculates the checksum of the string.
[Format]
<Numeric Variable>=CkSum(<Character String>, <Equation 1>, <Equation 2>)
[Terminology]
<Character String> Specifies the string from which the checksum should be calculated.
<Equation 1>
<Equation 2>
[Reference Program]
1 M1=CkSum("ABCDEFG",1,3) ' &H41("A")+&H42("B")+&H43("C")=&HC6 is assigned to M1.
[Explanation]
(1) Adds the character codes of all characters in the string from the starting position to the end position and
returns a value between 0 and 255.
(2) If the starting position is outside the range of the string, an error will be generated.
(3) If the end position exceeds the end of the string, checksum from the starting position to the last character
in the string will be calculated.
(4) If the result of addition exceeds 255, a degenerated value of 255 or less will be returned.
(5) It is not possible to describe a function that contains an argument in <Character String>, <Equation 1>
and <Equation 2>. If such a function is described, an error will be generated during execution.
Cos
[Function]
Gives the cosine.
[Format]
<Numeric Variable>=Cos(<Equation>)
[Reference Program]
1 M1=Cos(Rad(60))
[Explanation]
(1) Calculates the cosine of the equation.
(2) The range of arguments will be the entire range of values that are allowed.
(3) The range of the return value will be from -1 to 1.
(4) The unit of arguments is in radians.
[Reference]
Sin, Tan,
Atn/Atn2
4-406 Detailed Explanation of Functions
Specifies the first character position from where the checksum calculation starts.
Specifies the first character position from where the checksum calculation ends.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents