![Embedded Systems LM5p-GSM Product Manual Download Page 111](http://html1.mh-extra.com/html/embedded-systems/lm5p-gsm/lm5p-gsm_product-manual_2399466111.webp)
111
will iterate over all lines of the file. When the iterator function detects the end of file, it returns
nil (to finishthe loop) and automatically closes the file.
The call
io.lines()
(with no file name) is equivalent to
io.input():lines()
; that is, it iterates over the
lines of the default input file. In this case it does not close the file when the loop ends.
io.open (filename [, mode])
This function opens a file, in the mode specified in the string mode. It returns a new file handle,
or, in case of errors, nil plus an error message. The mode string can be any of the following:
• "r": read mode (the default);
• "w": write mode;
• "a": append mode;
• "r+": update mode, all previous data is preserved;
• "w+": update mode, all previous data is erased;
• "a+": append update mode, previous data is preserved, writing is only allowed at the
end of file.
The mode string can also have a 'b' at the end, which is needed in some systems to open the
file in binary mode. This string is exactly what is used in the standard C function
fopen
.
io.output ([file])
Similar to io.input, but operates over the default output file.
6.2.26.
Mathematical functions
This library is an interface to the standard C math library. It provides all its functions inside the
table math.
math.abs (x)
Returns the absolute value of x.
math.acos (x)
Returns the arc cosine of x (in radians).
math.asin (x)
Returns the arc sine of x (in radians).
math.atan (x)
Returns the arc tangent of x (in radians).
math.atan2 (y, x)
Returns the arc tangent of y/x (in radians), but uses the signs of both parameters to find the
quadrant of the result. (It also handles correctly the case of x being zero.)
math.ceil (x)
Returns the smallest integer larger than or equal to x.
math.cos (x)
Summary of Contents for LM5p-GSM
Page 10: ...10 1 Terminal connection schemes Model ...
Page 12: ...12 canX connection Powering over 24V terminals ...
Page 15: ...15 Digital output e g relay contactor ...
Page 16: ...16 Digital or Analog input e g pushbutton or 0 5V current measurement sensor ...
Page 17: ...17 Digital input e g pushbutton ...
Page 18: ...18 1 wire connection ...
Page 19: ...19 2 Standards supported ...
Page 22: ...22 3 Insert SIM card and close the holder Close the front cover ...
Page 36: ...36 ...
Page 48: ...48 ...
Page 120: ...120 Show logs window show logs in separate window Edit custom JavaScript ...
Page 156: ...156 Additional classes additional CSS classes for the element ...
Page 201: ...201 ...
Page 221: ...221 Clear binary object value at priority 12 bacnet write 127001 binary value 2305 nil 12 ...
Page 246: ...246 value event getvalue res value 100 255 grp write 1 1 6 res dt uint8 ...
Page 277: ...277 ...
Page 282: ...282 Press this button to upload new settings to all modified all devices ...