Campbell CR800 Spezifikationen Seite 227

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 324
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 226
Section 8. Processing and Math Instructions
Randomize (Number)
Initializes the random-number generator.
Syntax
Randomize (Number)
Remarks
The argument number can be any valid numeric expression. Number is used to
initialize the random-number generator by giving it a new seed value. If you
omit number, the value returned by the Timer function is used as the new seed
value.
If Randomize is not used, the Rnd function returns the same sequence of
random numbers every time the program is run. To have the sequence of
random numbers change each time the program is run, place a Randomize
statement with no argument at the beginning of the program.
RealTime
Used to pick out year, month, day, hour, minute, second, usecond, day of
week, and/or day of year from the CR800 clock.
Syntax
RealTime(Dest)
Remarks
The destination array must be dimensioned to 9.
RealTime Example
This example uses RealTime to place all time segments in the Destination array. If
the remark (‘) is removed from the first 8 Sample statements and the last Sample
statement is remarked, the results will be exactly the same.
Public rTime(9) 'declare as public and dimension rTime to 9
Alias rTime(1) = Year 'assign the alias Year to rTime(1)
Alias rTime(2) = Month 'assign the alias Month to rTime(2)
Alias rTime(3) = Day 'assign the alias Day to rTime(3)
Alias rTime(4) = Hour 'assign the alias Hour to rTime(4)
Alias rTime(5) = Minute 'assign the alias Minute to rTime(5)
Alias rTime(6) = Second 'assign the alias Second to rTime(6)
Alias rTime(7) = uSecond 'assign the alias uSecond to rTime(7)
Alias rTime(8) = WeekDay 'assign the alias WeekDay to rTime(8)
Alias rTime(9) = Day_of_Year 'assign the alias Day_of_Year to rTime(9)
DataTable (VALUES, 1, 100) 'set up data table
DataInterval(0, 1, mSec, 0) 'set up data table
' Sample(1, Year, IEEE4) 'place Year in VALUES table
' Sample(1, Month, IEEE4) 'place Month in VALUES table
' Sample(1, Day, IEEE4) 'place Day in VALUES table
' Sample(1, Hour, IEEE4) 'place Hour in VALUES table
' Sample(1, Minute, IEEE4) 'place Minute in VALUES table
' Sample(1, Second, IEEE4) 'place Second in VALUES table
' Sample(1, uSecond, IEEE4) 'place uSecond in VALUES table
' Sample(1, WeekDay, IEEE4) 'place WeekDay in VALUES table
8-25
Seitenansicht 226
1 2 ... 222 223 224 225 226 227 228 229 230 231 232 ... 323 324

Kommentare zu diesen Handbüchern

Keine Kommentare