Page 1 of 1

RS232 eblock unexpected charactors?

Posted: Thu Sep 15, 2016 11:26 am
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

Re: RS232 eblock unexpected charactors?

Posted: Thu Sep 15, 2016 1:02 pm
by LeighM
Hi Chris,
Have you attached the correct project? I don't see any UART or output
Leigh

Re: RS232 eblock unexpected charactors?

Posted: Thu Sep 15, 2016 1:35 pm
by Chris_MIRA
Oops... sorry, to many programs on the same project, the attached file is the one with the RS232 stuff!
Regards,
Chris

Re: RS232 eblock unexpected charactors?

Posted: Thu Sep 15, 2016 2:24 pm
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

Re: RS232 eblock unexpected charactors?

Posted: Thu Sep 15, 2016 2:48 pm
by Chris_MIRA
Hi,
thank you for the fast response, Ill go-try it and will let you know :-)
regards,
Chris