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
RS232 eblock unexpected charactors?
Moderator: Benj
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
RS232 eblock unexpected charactors?
- Attachments
-
- Screenshot RS232 Error.JPG
- (124.22 KiB) Downloaded 878 times
-
- HiUCV Loadbank.fcfx
- (22.58 KiB) Downloaded 234 times
- 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?
Hi Chris,
Have you attached the correct project? I don't see any UART or output
Leigh
Have you attached the correct project? I don't see any UART or output
Leigh
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: RS232 eblock unexpected charactors?
Oops... sorry, to many programs on the same project, the attached file is the one with the RS232 stuff!
Regards,
Chris
Regards,
Chris
- Attachments
-
- PSU DRIVER Chris L.fcfx
- (38.37 KiB) Downloaded 227 times
- 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?
Hi Chris,
This is probably due to our string concatenation not liking more than two strings.
Could you try changing this ...
To something like this ...
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
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"
Code: Select all
Vout_Max_Str = ToString$ (Vout_Max)
Vmax_serial = "SOUR:VOLT " + Vout_Max_Str
Vmax_serial = Vmax_serial + "\r"
Leigh
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
Re: RS232 eblock unexpected charactors?
Hi,
thank you for the fast response, Ill go-try it and will let you know
regards,
Chris
thank you for the fast response, Ill go-try it and will let you know
regards,
Chris