Campbell Scientific COM9602 Manuel D'utilisation page 18

Masquer les pouces Voir aussi pour COM9602:
Table des Matières

Publicité

Enregistreur de données de la série CR1000
Ceci est un exemple de programme qui envoie des données à partir du module de communication
satellite COM9602
Un drapeau qui transmet de l'information de définition de la table de données existe après le
lancement d'un nouveau
'starts.
'Data for reference/Test
Public PTemp, BattV,
Units PTemp = Degree C
Units BattV = V
'serial port for communications
Const SBDComPort = COM1
'Define how many data tables are to be sent using SBD communications
Const NumberDataTables=2
'Require a variable for when a new DataTable file for transmission is created
Public NewTableFile(NumberDataTables) As Boolean
Public SendSbdMessage(NumberDataTables) As Boolean
'Require strings for the unique file names associated with the data table files
Public TableFileName(NumberDataTables) As String * 40
' used to send complete data definition information
'Normally sent once after the program starts
Public DataDefinitionFlag(NumberDataTables) As Boolean
'A flag that will perform an initialization on the Modem to disable handshaking
Public InitializeModem As Boolean
Public SBD_TestTransmissionFlag As Boolean
'This public text from the COM9602 subroutine can be viewed or stored for diagnostics.
Public COM9602_ResultString As String * 50
Dim DataTableCount As Long
Dim cntr2 As Long
'Hourly Data Table
'This is Table "1"
DataTable (TableOne,1,-1)
DataInterval (0,60, Min, 0)
TableFile ("USR:TableOne", 1,0, 1,0, 0, NewTableFile(1), TableFileName(1))
Minimum (1, BattV, FP2, 0, False)
Sample (1, PTemp, FP2)
EndTable
'Daily Data Table
'This is Table "2"
DataTable (TableTwo, 1, -1)
DataInterval (0,1440, Min, 0)
TableFile ("USR:TableTwo", 1,0, 1,0, 0, NewTableFile(2), TableFileName(2))
Minimum (1, BattV, FP2, 0, False)
Sample (1, PTemp, FP2)
EndTable
Include "CPU:Com9602 CR1000_Sub_str_Enc.CR1"
BeginProg
'A USR Drive is required for the COM9602 subroutine to store some temporary files.
SetStatus ("USRDriveSize",32768)
'Setup communication port for the COM9602
Modem de rafales de données courtes COM9602
13

Publicité

Table des Matières
loading

Table des Matières