ADC value to PC

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times
Contact:

ADC value to PC

Post by armagon29 »

Dear All:

I have a problem, may you can help me, I need to send a ADC value to PC Terminal trough RS232 (E-block15), but when pic send ADC value (Byte) to PC, the value is show as a character (Single letter or number) not a Byte value, why?, see the file attached

Thanks

Armagon
Attachments
ADC to PC.fcf
FC v3 File
(7 KiB) Downloaded 394 times

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: ADC value to PC

Post by DavidA »

Hi,

The RS232 sends these single ASCII characters as they represent a byte, you can use any lookup table to tell what bytes these characters represent.

Eg: http://www.asciitable.com/ External link not supported by Matrix Multimedia

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: ADC value to PC

Post by Benj »

If you convert the byte value to a string using a toString string manipulation function then you can send the string down the RS232 a character at a time.

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Been thanked: 2 times
Contact:

Re: ADC value to PC

Post by armagon29 »

Dear Sir:

I already dome modification using a string function, but now the question is how to send a string trough RS232 macro, it does not have a sent string option?

Thanks

Armagon

See attachment
Attachments
ADC to PC.fcf
(7 KiB) Downloaded 386 times

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: ADC value to PC

Post by Benj »

Hello,

Sorry its v4 that has the RS232 string send functionality.

You can instead create a simple loop to step through the string until you reach the end or a null character. See the attached example.
Attachments
Flowcode1.fcf
(5.5 KiB) Downloaded 406 times

Post Reply