RS232 works in sim but not real (Flowcode v6)

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

Post Reply
Beertree
Posts: 24
Joined: Wed Apr 29, 2015 4:49 pm
Has thanked: 5 times
Been thanked: 5 times
Contact:

RS232 works in sim but not real (Flowcode v6)

Post by Beertree »

Hello at all,
I am working since two days on the same problem. I want to send a combined string via RS232 SendString function with PIC 16 F 1937. The attached program first sends a constant string via that function. That works fine. When I then try to send a string which is produced via a Str=Str+Str2 the communication does not work... In the simulation everything works fine.

There is a gap between simulated values and real life I cannot explain. Any ideas?
Attachments
simulation.jpg
Works fine
(172.84 KiB) Downloaded 2253 times
hterm.jpg
real life (does not work)
(143.5 KiB) Downloaded 2253 times
Flowcode1vorl.fcfx
(20.69 KiB) Downloaded 366 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: RS232 works in sim but not real (Flowcode v6)

Post by medelec35 »

Hi Beertree.
Welcome to Martix TSL Forums
It appears Flowcode V6 prefers string to be assigned within a calculation box rather than in ' Initial value', variable creation stage.

Can you try a calculation box at the start of Main with:

Code: Select all

Bef = "abc"
SerBef = "def"
To me it looks like when a string is preassigned, the wrong location is being pointed to.
All other Non string variables e.g Byte, Int,UInt etc can be preassigned

Not sure if you are aware or not.
To same memory:
When creating a string variable, after the variable name just place square brackets with with array size within brackets.
E.g Mystring[3]

Wikki help is a good place to look for help
Also Learning center is great for extra resources.

Martin
Martin

Beertree
Posts: 24
Joined: Wed Apr 29, 2015 4:49 pm
Has thanked: 5 times
Been thanked: 5 times
Contact:

Re: RS232 works in sim but not real (Flowcode v6)

Post by Beertree »

Hi Martin,
now it is working! Tricky thing. Thank you so much!

Yours
Marten

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: RS232 works in sim but not real (Flowcode v6)

Post by medelec35 »

Hi Marten,
Glad It's now working for you.
Yes it was a tricky one.
I have moved this thread to Flowcode V6 Bugs section since issue was with Flowcode rather then Eblocks.

Martin
Martin

Post Reply