RS232 eblock unexpected charactors?

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

Moderator: Benj

Post Reply
Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

RS232 eblock unexpected charactors?

Post by Chris_MIRA »

Hi,
In FC7, Im using the eblocks CAN and RS232 modules to make a translator for communication between two pieces of kit (see HiUCV FC 7 file attached). The programme works BUT the RS232 messages outputted from the eblock have extra characters attached (see Screenshot), the extra characters being !<SYN>T. Unfortunately these characters mess up the kit receiving the message so I need to remove them. I think they are being added automatically as some sort of synchronisation but have no clue how to resolve / stop them. Please help!! :-)

Regards,
Chris
Attachments
Screenshot RS232 Error.JPG
(124.22 KiB) Downloaded 878 times
HiUCV Loadbank.fcfx
(22.58 KiB) Downloaded 234 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: RS232 eblock unexpected charactors?

Post by LeighM »

Hi Chris,
Have you attached the correct project? I don't see any UART or output
Leigh

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: RS232 eblock unexpected charactors?

Post by Chris_MIRA »

Oops... sorry, to many programs on the same project, the attached file is the one with the RS232 stuff!
Regards,
Chris
Attachments
PSU DRIVER Chris L.fcfx
(38.37 KiB) Downloaded 227 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: RS232 eblock unexpected charactors?

Post by LeighM »

Hi Chris,
This is probably due to our string concatenation not liking more than two strings.

Could you try changing this ...

Code: Select all

Vmax_serial = "SOUR:VOLT " + ToString$ (Vout_Max) + "\r"
To something like this ...

Code: Select all

Vout_Max_Str = ToString$ (Vout_Max)
Vmax_serial = "SOUR:VOLT " + Vout_Max_Str
Vmax_serial =  Vmax_serial + "\r"
There has been some work in this area recently by our team on V7, so hopefully this won't be needed once the update is released.
Leigh

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: RS232 eblock unexpected charactors?

Post by Chris_MIRA »

Hi,
thank you for the fast response, Ill go-try it and will let you know :-)
regards,
Chris

Post Reply