Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Invalid or out of place instruction for "CheckAlarm" , "ComposeAlarmTime" and AlarmStatus(1) = alsNone


#RD@2020 Apr 21, 2020 01:35 PM

Hello,

I'm facing a strange problem at the time of compiling the program in CRBasic.How can I remove Invalid or out of place instruction for "CheckAlarm,AlarmStatus(1) = alsNone" and "ComposeAlarmTime"? 

My Program is for Strain gauges '  Warnings and alarms " limits 

Below is some part of the program 

' --- Warnings and alarms ---
' Warning limits
Dim WrnLoStrain(NoOfSG) ' Strain lower limits [µstrain]
Dim WrnUpStrain(NoOfSG) ' Strain upper limits [µstrain]

' Alarm limits
Dim AlmLoStrain(NoOfSG) ' Strain lower limits [µstrain]
Dim AlmUpStrain(NoOfSG) ' Strain upper limits [µstrain]

BeginProg
ixStrainAvg = 1
ixTempAvg = 1

LoggerID=Status.StationName(1,1) & " " & PgmVer
Flg_Single = False
Flg_Auto = True
Flg_SW12V = True
IsTableTrig = False
FillParams ' Fill parameters from ini file
AlmStrnlvl() = 0

AlarmStatus(1) = alsNone
AlarmChanged = False
AlarmMsgRdy = False

NextScan ' End of main scan loop

SlowSequence
Scan (10, sec, 0, 0)
If TimeIntoInterval (0, 1, min) Then
FillParams ' Fill parameters from ini file
EndIf

If NOT AlarmMsgRdy Then ' Perform check only if PC has read AlarmStatus
CheckAlarm
If AlarmChanged Then
Dim TimeStamp(9) As Long ' Date and time when the alarm was detected

RealTime (TimeStamp)
ComposeAlarmTime (TimeStamp)
AlarmMsgRdy = True ' Notify PC that alarm data are ready
AlarmChanged = False
EndIf
EndIf

EndProg

Thanks! I really appreciate your help.would appreciate a response as soon as possible because we are working on an important project and we need urgently a solution.

Thank You!


JDavis Apr 21, 2020 03:10 PM

That is not a complete program, so I cannot try compiling it. Please post the complete program. If you don't want to post the complete program, please contact your local Campbell Scientific office and send the complete program to them.


#RD@2020 Apr 21, 2020 04:29 PM

Thanks!

I can post the program but it includes 5 dld files.it's better to sent to Campbell Scientific Office.

Log in or register to post/reply in the forum.