julius228 Posted January 17, 2011 Share Posted January 17, 2011 Hi all, I have problem whit this code: device.mydevice.Port=1 try device.mydevice.InitComm() delay(3) catch() ? "Com busy" Endcatch When I execute previous code, I get the follow error message: Unable to initialize Com1: Can't access port, probably in use by another app How can I print the string "Com busy" instead of DF error message? Any help is appreciated. Thanks, Giulio. Link to comment Share on other sites More sharing options...
AzeoTech Posted January 17, 2011 Share Posted January 17, 2011 Initializing the comm port is an asynchronous process, so any failure goes directly to the Command/Alert window. The only way to catch init errors is to use the OnAlert system event (see 5.28 in the user's guide) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.