Losing connection to COM4

Hi,

Every two or three days I’m losing the connection to my RFID Leser on COM4. I don’t know why, and the only way to reset this is to push the OK button in the Serial Port Module.

Is there a way to reset the connection with a script?

I tried the code below, but with no result. I tried all of it and only the part for setting COM4 or Open/Close Serial Port. All with no result. Once in the Module and only pushing the OK button and the connection is working again.


COMPort_SetOpen(38636 /*[Serial Port]*/, False);
COMPort_SetPort(38636 /*[Serial Port]*/, "COM1");
COMPort_SetOpen(38636 /*[Serial Port]*/, True);

COMPort_SetOpen(38636 /*[Serial Port]*/, False);
COMPort_SetPort(38636 /*[Serial Port]*/, "COM4");
COMPort_SetOpen(38636 /*[Serial Port]*/, True);

I hope someone can help me with this.

Thanks.

Albert

Think you need „IPS_ApplyChanges“ command

Gruß
Bruno

Thanks, I will try this.

Normally the port will be blocked in a few days, I will let you know.

Albert

OK, this morning the connection to COM4 was lost again and I could run the script successfully. So for the other readers, just simply run the script below every day and hopefully this problem will be over.


<?

COMPort_SetOpen(38636 /*[Serial Port]*/, True);
IPS_ApplyChanges(38636 /*[Serial Port]*/);

?>

Albert