hello dear all,
as i am new in citect, in my project i have problem with citect sound.
i set an alarm in category 1 and when this tag is activated it must sound an wave file in a loop until the tag is deactivated.
i use a function in cicode as below:
FUNCTION
PlayAlarmSound()
INT I=1
WHILE I<>0 DO
DspPlaySound("C:\Program Files\Citect\CitectSCADA\User\JNL\Urgent.WAV",0);
Sleep(3);
END
END
in "alarm>alarm categories>on action" I entered PlayAlarmSound();
when i run the project and enable that tag, alarm sounds one time unwilling,because it must sound it a loop for ever.in hardware alarm an alarm accrues like this:
foreground cicode cannot block ........... sleep ........... PlayAlarmSound
my sound file length is about 1 second.
so what is my problem,what is going wrong?