Problems with sending a string over RS232

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

Moderator: Benj

Post Reply
Wolfgang Kos
Posts: 21
Joined: Wed Jun 19, 2013 8:43 am
Has thanked: 2 times
Been thanked: 3 times
Contact:

Problems with sending a string over RS232

Post by Wolfgang Kos »

I have problems with sending a string to Bluetooth Modul via RS232 like this:
This will not function:
I will adding 3 Strings to 1 String like this:
SEND_WERT11 = PC_Modus11 + WERT_11 + RETURN
The code will not function:
FCD_047b2_RS232_BLE__SendString(FCV_SEND_WERT11, FCVsz_SEND_WERT11);

This is function fine with 1 string:
FCD_047b2_RS232_BLE__SendString("SUW,12345678901234567890123456789011,1234\r\n", 44);

Here the 3 strings:
PC_Modus11 = "SUW,12345678901234567890123456789011,"
WERT_11 = "1234"
RETURN = "\r\n"


In the log i can see Infos over' FCI_SHEAD'

13.01.2017.c: In function 'main':
13.01.2017.c:3480: warning: pointer targets in passing argument 1 of 'FCI_SCOPY' differ in signedness
13.01.2017.c:3480: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
13.01.2017.c:3481: warning: passing argument 2 of 'FCI_TOSTRING' discards qualifiers from pointer target type
13.01.2017.c:3482: warning: pointer targets in passing argument 1 of 'FCI_SCOPY' differ in signedness
13.01.2017.c:3482: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
13.01.2017.c:3483: warning: passing argument 1 of 'FCI_SHEAD' discards qualifiers from pointer target type
13.01.2017.c:3483: warning: passing argument 3 of 'FCI_SHEAD' discards qualifiers from pointer target type
13.01.2017.c:3484: warning: passing argument 3 of 'FCI_SHEAD' discards qualifiers from pointer target type
13.01.2017.c:3484: warning: passing argument 5 of 'FCI_SHEAD' discards qualifiers from pointer target type
13.01.2017.c:3607: warning: passing argument 1 of 'FCD_047b2_RS232_BLE__SendString' discards qualifiers from pointer target type


What is the error?
Thank you for all infos.

Wolfgang

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: Problems with sending a string over RS232

Post by LeighM »

Hi,
String concatenation has issues/bugs when more than two are added.
So please try to do this in more steps,
e.g.
String = A
String = String + B
String = String + C

Wolfgang Kos
Posts: 21
Joined: Wed Jun 19, 2013 8:43 am
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Problems with sending a string over RS232

Post by Wolfgang Kos »

Hello LeighM,

thank you for your Info, i will check... :)

Wolfgang Kos
Posts: 21
Joined: Wed Jun 19, 2013 8:43 am
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Problems with sending a string over RS232

Post by Wolfgang Kos »

OK,
the problem is solved, only 2 Strings

Post Reply