Go to documentation repository
Operator format to describe actions with the Audio player:
DoReact("PLAYER","_id_","_command_" [,"_parameters_"]);
Format of events procedure for the Microphone:
OnEvent("OLXA_LINE ", "_id_","_event_")
Operator format to describe actions with the Microphone:
DoReact("OLXA_LINE ","_id_","_command_" [,"_parameters_"]);
Function to check the state of the Microphone object:
CheckState("OLXA_LINE","number","state")
Examples of using events and reactions of the Audio player object:
Playback the audio file when the camera stops recording:
OnEvent("CAM",N,"REC_STOP")
{
DoReact("PLAYER","1","PLAY_WAV","file<C:\Program Files (x86)\Axxon PSIM\Wav\cam_alarm_"+N+".wav>,from_macro<1>");
}
Stop playing back the audio file when the camera starts recording:
OnEvent("CAM",N,"REC")
{
DoReact("PLAYER","1","STOP_WAV");
}
OnEvent("MACRO","1","RUN")
{
flag=1;
[
for(i=1;flag;i=1)
{
DoReact("PLAYER","1","PLAY_WAV","file<C:\Program Files\Axxon PSIM\Wav\cam_alarm_1.wav>");
Wait(3);
}
]
}
OnEvent("MACRO","8","RUN")
{
flag=0;
}
Examples of using events and reactions of the Microphone object:
Turn on the first microphone when the sound activated recording is enabled.
OnEvent("OLXA_LINE","1","accu_start") //enable sound activated recording
{
DoReact("OLXA_LINE","1","ARM"); //enable record from microphone
}
Set minimum compression on microphone when disabling record of audio signal.
OnEvent("OLXA_LINE","1","DISARM") // disable record from microphone
{
DoReact("OLXA_LINE","1","SETUP","compression<5>"); //minimum compression is set up
}
OnInit()
{
flag=0;
}
OnEvent("CAM","3","MD_START")
{
flag=str(flag+1);
DoReact("OLXA_LINE","1","RECORD_START");
}
OnEvent("OLXA_LINE","1","ACCU_START")
{
flag=str(flag+1);
DoReact("OLXA_LINE","1","RECORD_START");
}
OnEvent("OLXA_LINE","1","ACCU_STOP")
{
flag=str(flag-1);
if (!(flag))
{
DoReact("OLXA_LINE","1","RECORD_STOP");
}
}
OnEvent("CAM","3","MD_STOP")
{
flag=str(flag-1);
if (!(flag))
{
DoReact("OLXA_LINE","1","RECORD_STOP");
}
}