USB Serial

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

USB Serial

Post by Desdewit »

Hi

Is it normal for a program that are using usb serial to stop running If the usb is not plugged in or should the program continue to run :? :cry:

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Serial

Post by Benj »

Hello,

The USB Init routine will by default wait forever for a USB enumeration, that is the PC request for info and the device is setup correctly with device drivers.

If you go into the USB component properties then you can enable a timeout which will allow the init function to wait for a bit and then resume your program. The return value from the init routine then tells you if the USB is active or not.

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: USB Serial

Post by Desdewit »

Hi Benj

Thanks for the info. I got this one sorted just before you replied. :oops:

Post Reply