Are there any documents that explain how to properly use the RS232 macro. Anything I send outputs an *.
In addition, I am new to flowcoding and PICs and would appreciate any suggestions or tips.
Thanks,
Chad
RS232 help
- 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:
Hello
You can send characters or strings with the send macro.
characters can be defined as 'A' or 'a' or the ASCII equivalent.
strings can be defined as "Hello" or "World" or an array of the ASCII equivalent.
You can only receive a single character at a time. So to build up a string you would have to use an array of bytes to store the incoming data.
The timeout on the receive represents the length of time to wait. A 0 indicates a wait forever. This can be problematic as if an error occurs it will remain and your program may well freeze where it is.
The return value is the incoming byte. If the value is 255 then a timeout occurred. It is best to use this function with a timeout between 50 and 200 and then followed by a decision that checks to see if the returned value is <255.
There should be a help file for the RS232 component that is packaged with Flowcode. click on the small arrow of the RS232 component and then select properties. Then you will have access to a help button which will spawn the help file.
You can send characters or strings with the send macro.
characters can be defined as 'A' or 'a' or the ASCII equivalent.
strings can be defined as "Hello" or "World" or an array of the ASCII equivalent.
You can only receive a single character at a time. So to build up a string you would have to use an array of bytes to store the incoming data.
The timeout on the receive represents the length of time to wait. A 0 indicates a wait forever. This can be problematic as if an error occurs it will remain and your program may well freeze where it is.
The return value is the incoming byte. If the value is 255 then a timeout occurred. It is best to use this function with a timeout between 50 and 200 and then followed by a decision that checks to see if the returned value is <255.
There should be a help file for the RS232 component that is packaged with Flowcode. click on the small arrow of the RS232 component and then select properties. Then you will have access to a help button which will spawn the help file.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel