Ejemplo n.º 1
0
int CVICALLBACK resetoscillo (int panel, int control, int event,
							  void *callbackData, int eventData1, int eventData2)
{
	switch (event)
	{
		case EVENT_COMMIT:
			reset_connection_oscillo();
			break;
	}
	return 0;
}
Ejemplo n.º 2
0
void setup_oscillo(void)
{
	static char write_buffer[100];
	//printf("test\n");
	// find hardware
	reset_connection_oscillo();
	// configure oscilloscope 
	strcpy (write_buffer, "DATA:ENCdg RIBinary");
	ibwrt (device, write_buffer, strlen(write_buffer));

// strcpy (write_buffer, "TRIGger:MAIn:MODe NORMal");
// ibwrt (device, write_buffer, strlen(write_buffer));

	strcpy (write_buffer, "DATA:WIDTH 1");
	ibwrt (device, write_buffer, strlen(write_buffer));

	strcpy (write_buffer, "DATA:SOURCE CH1");
	ibwrt (device, write_buffer, strlen(write_buffer));
	SetCtrlVal(ERG_panel, ERG_panel_LED_chanel1, 1);
	SetCtrlVal(ERG_panel, ERG_panel_LED_chanel2, 0);
	
// to check the oscillo settings	
/*	strcpy (write_buffer, "DATA?");
	ibwrt (device, write_buffer, strlen(write_buffer));
	ibrd (device, read_buffer, numToRead);
	printf("%s", read_buffer);
*/

// to setup the oscillo scales from the start
	/*
	strcpy (write_buffer, "CH2:SCALE 2E-3");
	ibwrt (device, write_buffer, strlen(write_buffer));

	strcpy (write_buffer, "CH2:POSITION -2");
	ibwrt (device, write_buffer, strlen(write_buffer));

	strcpy (write_buffer, "HORIZONTAL:SECdiv 10E-3");
	ibwrt (device, write_buffer, strlen(write_buffer));

	strcpy (write_buffer, "HORIZONTAL:POSITION 40E-3");
	ibwrt (device, write_buffer, strlen(write_buffer));
	*/
	return;

}
Ejemplo n.º 3
0
void setup_oscillo(void)
{
	static char write_buffer[100];
	// find hardware
	reset_connection_oscillo();
	// configure oscilloscope 
	strcpy (write_buffer, "DATA:ENCdg RIBinary");
	ibwrt (device, write_buffer, strlen(write_buffer));

	strcpy (write_buffer, "DATA:WIDTH 1");
	ibwrt (device, write_buffer, strlen(write_buffer));

	strcpy (write_buffer, "DATA:SOURCE CH1");
	ibwrt (device, write_buffer, strlen(write_buffer));
	SetCtrlVal(Main_pnl_handle, ERG_panel_LED_chanel1, 1);
	SetCtrlVal(Main_pnl_handle, ERG_panel_LED_chanel2, 0);
	return;

}