// put the following code in "filename_main.c"
// -----made in india by dmpandit@gmail------

//--------------------put at beginning--------------------
// Global Variables (put at beginning)
// decide no of samples:
// for a 50Hertz sine wave at Ts = 1e-5 sample time, I'll have (1/50)/(1e-5) = 2000 samples per cycle

int32_T out_buffer[2000]; 		//buffer for graphs = number of sample points to be seen at a single view in graph
const short BUFFERLENGTH = 2000; 	//size of buffer = same as above
short ii = 0;				// counter

//--------------------put at the end of "void rt_OneStep(void)" function--------------------
// after overrunflag--; instruction
// replace "test_plot_B.sineWave" by "filename_B.watchVariable"

out_buffer[ii] = test_plot_B.sineWave;
ii++;
if(ii==BUFFERLENGTH)
	ii = 0;

//--do the following now---
// file-->save
// project-->rebuild all
// file-->load program-->filename.out
// view-->graph-->time-frequency

// debug-->real time refresh
// run
// hip hip hurray!