Tscope5
Main Page
Related Pages
Files
Examples
parport03.c
////////////////////////////////////////////////////////////////////////////////
//
// __ ______
// / /_______________ ____ ___ / ____/
// / __/ ___/ ___/ __ \/ __ \/ _ \ /___ )
// / /_(__ ) /__/ /_/ / /_/ / __/ ____/ /
// \__/____/\___/\____/ .___/\___/ /_____/
// /_/
//
// parport03.c
// - Use the parallel port for trigger output.
// - This example can be used together with parport02.c
// (on another computer).
// - This example does not open a display
////////////////////////////////////////////////////////////////////////////////
#include <tscope5.h>
#include <stdio.h>
int
main()
{
// set the log level to some high value
ts5_set_log_level
(TS5_LOGLEVEL_4);
// send a trigger, this will install all necessary systems
ts5_set_parport_trigger_output_time
(1, 0.002);
ts5_send_parport_trigger
(1, 255);
// send 10 triggers, one every second
int
i;
double
start =
ts5_get_time
();
for
(i=0; i<10; i++) {
ts5_send_parport_trigger
(1, i+1);
ts5_wait_until
(start+(i+1));
}
return
0;
}