beautypg.com

Fairbanks FB3000 Kernel Program Operators Manual User Manual

Page 50

background image

Appendix II: I/O Addresses & Controls

04/12

50

51146 Rev. 3

SHARED MEMORY (KERNEL MAPPED OUTPUT), CONTINUED

{

LastCounter = MapOutputData->counter;

int len = MapOutputData->length;

if( len > sizeof(MapOutputData->data)-1 )

len = sizeof(MapOutputData->data)-1;

ScaleStatus_Text->Caption = (String)MapOutputData->status;

input[0] = NULL;

for ( int mf = 0; mf < len; mf++ ) {

input[mf] = MapOutputData->data[mf];

}

input[len] = NULL;

// return command i.e. ‘z’ to zero scales, ‘u’ to change units etc… (2 char buffer… ‘Z1’ to zero
scale 1)

if( KernelCommand[0] != NULL )

{

MapOutputData->command[0] = KernelCommand[0];

MapOutputData->command[1] = KernelCommand[1];

KernelCommand[0] = NULL;

CommandSent = true;

}

result = true;

}

// release semaphore for kernel

ReleaseSemaphore(wSemaphore, 1, NULL);

}

return result;

}

//---------------------------------------------------------------------------