Page 1 of 1

RS232 works in sim but not real (Flowcode v6)

Posted: Sat May 02, 2015 8:28 am
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?

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

Posted: Sat May 02, 2015 10:08 am
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

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

Posted: Sun May 03, 2015 7:28 am
by Beertree
Hi Martin,
now it is working! Tricky thing. Thank you so much!

Yours
Marten

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

Posted: Mon May 04, 2015 10:28 am
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