RS485 sample code

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
LPB
Posts: 3
Joined: Wed May 11, 2011 7:35 am
Has thanked: 1 time
Contact:

RS485 sample code

Post by LPB »

In the article update on RS485 Using the EB062 E-block reference is made that the requirement is a Profesional V3 Flowcode
both the codes are for V4, please make code available for V3. The V4 demo does not create for RS232. Thanks

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: RS485 sample code

Post by DavidA »

Hi LPB,

The requirement section of the articles only references which versions of Flowcode are reccomended to create programs with the subject which is being discussed in the article and not just the requirements for the examples at the end. We don't want to alienate V3 users who read the article by saying the article is V4 only, as with V3 you can do RS485 comms just fine.

If you would like to view the code that Sean has done in the examples, you can download the free demo version of Flowcode V4, and open it to see the program, you wont be able to edit it, but you should be able to recreate it in V3 if you wished.

Flowcode V4 demo: http://www.matrixmultimedia.com/Downloa ... .php?id=75

LPB
Posts: 3
Joined: Wed May 11, 2011 7:35 am
Has thanked: 1 time
Contact:

Re: RS485 sample code

Post by LPB »

Thanks, I did download demo version 4 of FlowCode and recreate the Slavenode code in version 3 Professional.

When I do simulate the RS485 code, the If statement: Node address (Bit 9 set)? Cannot become true for the test is for the ninth bit: RxVal AND 0x100, the ReceiveRS232Char return value is an INTerger or then a single character 0 to f, to determine the ninth bit require three read instructions or three characters

If I step the program until the IF statement: Node address (Bit 9 set)?, and I then do enter 101 in the Variable monitoring panel the statement does become true and the program branches off the next IF statement

Do I miss something?

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: RS485 sample code

Post by Benj »

Hello,

9-bit data mode for the RS232 component is unfortunately a v4 feature only.

You could instead use 7-bit data and use the 8th bit as the node address bit.

LPB
Posts: 3
Joined: Wed May 11, 2011 7:35 am
Has thanked: 1 time
Contact:

Re: RS485 sample code

Post by LPB »

Hi Benji
I am still battling with RS485 coding, seems that the V5 of Flowcode do support this comms,
I saw there were a bug and it is fixed, Question Do you perhaps know who the distributor is in South Africa.
Which version of Flowcode do I need to buy, it seems that the home / hobbist version does not support RS 485 comms, to buy the professional just for the RS 485 component is also real expensive

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: RS485 sample code

Post by DavidA »

Hello our South Africa distributor is Yebo Electronics,

You can find their details on this page: http://www.matrixmultimedia.com/dealers.php

yes unfortunately we only offer two versions, maybe in the future we would like to do "Addon" bundles of components but sadly at the moment the pro version is the only way to get the component you require.

Post Reply