Yamaha RS232 => STRING Problem
MasterReboot
Posts: 20
Hi to All...
you are my last hope!
Program looks like that:
ACTIVE(FIND_STRING(DATA.TEXT,"'0026'",1)) :
{
SEND_STRING dvAMP,"$02,'22001',$03"
DB_LEVEL_TEMP1= RIGHT_STRING (AMP_BUFFER2, 9)
}
The problem is that anyway if I'm using left_string, right_string or what ever the compiler
ignores every string after the last "DC1" ($11) sign. But this is what I need...
Any suggestions?
look at the result:
you are my last hope!
Program looks like that:
ACTIVE(FIND_STRING(DATA.TEXT,"'0026'",1)) :
{
SEND_STRING dvAMP,"$02,'22001',$03"
DB_LEVEL_TEMP1= RIGHT_STRING (AMP_BUFFER2, 9)
}
The problem is that anyway if I'm using left_string, right_string or what ever the compiler
ignores every string after the last "DC1" ($11) sign. But this is what I need...
Any suggestions?
look at the result:
0
Comments
Also any time I'm using data.text other than master or virtual comms I append it to a local or global var. just in case the device hiccups or stutters and the complete string doesn't arrive in a single data.event. It's just a safer and more reliable way to collect your data.
Then I would use cSomeVar for my find_strings and remove, left, right_string... stuff working on a single buffer or var not 2 seperate ones.
Looks like you're not taking into account those oddball symbols in the count which represent non printing ascii characters. Switch the "Watch Bar" display from ascii to hex or decimal so you can see all the bytes.