You created a couple of global variables. This is not thread save.
double *Re_zArr, *Im_zArr, *RelErr_Arr, *Re_wArr, *Im_wArr;
double complex z, w;
int Npts;
int i;
Hello Sarah,
I've seen your example at labviewforum.de. If the 'RS 232 Test 1' button is true, you transmit the data on COM3 (instead of COM5). This looks confusing and might be the problem.