pdf | do ÂściÂągnięcia | ebook | pobieranie | download
Pokrewne
- Strona Główna
- Gromyko Olga Najwyśźsza WiedśĹźma
- stud service 2 strictly accountable
- Gauss Karl Markus W gć…szczu metropolii
- Arnold Judith MiśÂ‚osc na caśÂ‚e śźycie
- Clancy Thomas Leo (Tom) 5 Zwiadowcy 4 Walkiria
- 0098.Tinsley Nina One dwie
- FF Larisa The Blues
- Onora O'Neill Rethinking Informed Consent in Bioethics
- Wierny Jego Droga Jay Crownover
- Mercedes Lackey EM 3 The Serpents Shadow
- zanotowane.pl
- doc.pisz.pl
- pdf.pisz.pl
- elau66wr.xlx.pl
[ Pobierz całość w formacie PDF ]
SetTriggerMacro Associate an M-macro with OEM code 301
SystemWaitFor Pause script execution until specified named input signal is
asserted
Teach Files
AppendTeachFile Open a Teach file for append
CloseTeachFile Close currently open Teach file
LoadTeachFile Load current Teach file for execution
OpenTeachFile Open a new Teach file for writing
Miscellaneous
nFmt Round a Double value to a specified number of decimal places
PlayWave Play a .WAV file
Random Get a pseudo-random number
Roun Round a Double value to four decimal places
Sleep Pause script execution for specified length of time
Page 101
Speak Use voice synthesis to speak a String
Page 102
Modbus Functions Grouped Alphabetically
GetInBit
Function
This function
Arguments:
F
Return Value:
A
Example:
A
See also:
GetInput
Function
This function
Arguments:
F
Return Value:
A
Example:
A
See also:
ResetOutBit
Function
This function
Arguments:
F
Return Value:
A
Page 103
Example:
A
See also:
SetHomannString
Sub SetHomannString(Col As Integer, Row As Integer, Text As String)
This function writes the Text string to the LCD display on ModIO slave. Row and Col
specify the row and column position of the first character of the string. This function is
exactly equivalent to the SetModIOString function with a SlaveID of 1.
Arguments:
Slave is the ModBus Slave ID of the device whose LCD the string is written to
Col is the 0-based column to which the first character of the Text will be written.
Col must be an even number (multiple of 2).
Row is the 0-based row this which the Text will be written
Text is the String to be written to the LCD
Return Value:
None
Example:
Write Hello, world! to the second line of the 2x16 LCD on Modbus Slave 2
SetModIOString(2, 0, 1, Hello, world! )
See also:
FillFromCoil(), FillFromHolding(), FillFromInput(), FillFromStatus(),
GetModWord(), ModGetInputWord(), SetModIOString(), SetModOutput(),
SetModPlugString(), ResetOutBit(), GetInBit(), GetInput(), SetOutBit(),
SetOutput(), WaitForPoll(),SetModIOString()
SetModIOString
Sub SetModIOString(SlaveID As Integer, Col As Integer, Row As Integer, Text As
String)
This function writes the Text string to the ModIO devices LCD display. Row and Col
specify the row and column position of the first character of the string.
Arguments:
Slave is the ModBus Slave ID of the device whose LCD the string is written to
Col is the 0-based column to which the first character of the Text will be written.
Col must be an even number (multiple of 2).
Row is the 0-based row this which the Text will be written
Page 104
Text is the String to be written to the LCD
Return Value:
None
Example:
Write Hello, world! to the second line of the 2x16 LCD on Modbus Slave 2
SetModIOString(2, 0, 1, Hello, world! )
See also:
FillFromCoil(), FillFromHolding(), FillFromInput(), FillFromStatus(),
GetModWord(), ModGetInputWord(), SetModIOString(), SetModOutput(),
SetModPlugString(), ResetOutBit(), GetInBit(), GetInput(), SetOutBit(),
SetOutput(), WaitForPoll(),SetHomannString()
SetModOutput
Function
This function
Arguments:
F
Return Value:
A
Example:
A
See also:
SetOutBit
Function
This function
Arguments:
F
Return Value:
A
Example:
A
See also:
Page 105
WaitForPoll Unreliable& .
Function
This function
Arguments:
F
Return Value:
A
Example:
A
See also:
Page 106
Serial Output Functions Grouped Alphabetically
There are a number of serial functions in the v3 code-base, some previously documented,
some not. However, testing indicates the following is the only function that actually
works. Serial input is not supported in Mach3 v3.
SendSerial
Sub SendSerial(Data As String)
This function send the String Data to the serial port specified in the Config-
>GeneralConfig serial port configuration. This provides transmit-only capability, at any
supported BAUD rate.
Arguments:
String message to be sent to configured serial device
Return Value:
None
Example:
Send Hello, world! to serial device
SendSerial( Hello, world! & chr(10) & char(13))
See also:
Page 107
Script Pre-processing Functionality
Starting with Mach3 v3 version 3.43.06, Mach provides some pre-processing capability.
#Expand
Text from external files can be included and expanded inline using the #Expand facility.
The syntax is:
--- --- --
--------- --------------
| |
--- ---------
Examples:
#expand
#expand "path-spec"
= any number of spaces or tabs
= #expand - the word Expand can be any combination of upper
or lower case letters.
=
= path-spec
The path-spec is a filename optionally preceded by a directory specification. The
filename must name an existing file. path-spec is a relative path and filename, hence it
does not start with a leading \ .
Both syntax forms cause replacement of the #expand directive by the entire contents of
the specified include file.
The difference between the two forms is where the preprocessor searches for expand
files and the inclusion (or not) of the .m1s extension in the path spec.
Syntax
Action
Form
This form instructs the preprocessor to search for the expand file in a location
Angle-
dependant on the current runtime environment.
bracket
form
The rules are:
Page 108
1) if a wizard is NOT loaded (I.e. a regular screen set is loaded, the
preprocessor will look for the path-spec in
\ScreenSetMacros\\
2) if a wizard is loaded, the preprocessor will look for the path-spec in
\AddOns\\
For the Angle-bracket form, the extension is not included in the path-spec, and
the pre-processor will only look for a corresponding .m1s file.
This form is recommended for normal Mach screen set and wizard scripts.
This form instructs the preprocessor that the path-spec is a partially qualified
File name and that the preprocessor should simply use the entire QFN as found
in the #expand directive line.
The QFN is assumed to be relative to the .
Quoted As this is a QFN, it must also include the extension of the file to expand. (the
form extension is not restricted to .m1s, the preprocessor simply opens the specified
FQFN).
This for is recommended for user scripts which are not part of a screen set or
wizard.
The primary intent of this facility is to enable script authors to keep script sources in one
file and be able to reuse the source in multiple scripts.
For example many people prefer to define names for Mach s magic DRO and LED
numbers.
This is a trivial example which uses this idea:
Macro script:
Option Explicit
#expand
MsgBox "Mach's X DRO is # " & MachXDRONum
Page 109
Exit Sub ' return to Mach
Where MachConstants.m1s contains:
Const MachXDroNum = 800
The Mach #expand processing is recursive, so that you can include a file which in turns
includes a file etc.
The mach3 script editor has been enhanced to deal with script expansions.
Page 110
[ Pobierz całość w formacie PDF ]