String comparator ,problem

Antworten
TOURNEUR
Beiträge: 35
Registriert: Samstag 22. Mai 2010, 23:56

String comparator ,problem

Beitrag von TOURNEUR » Samstag 4. April 2015, 21:46

Hello ,

I'm trying to built ,an automatic program in Prflab ,for a bluetooth module.

When the module acknowledge the good protocol of command, it transmit a string "OK"

I 'm arrived to display this string ,but not compare.

I used string comparator with OK in channel A ,and string from port com receive.

I am not arrive to detect this "OK" string

Thank for people ,who can help me

Here, pictures of my problem
Dateianhänge
Ascii display.PNG
Ascii display.PNG (1.3 KiB) 5849 mal betrachtet
String display.PNG
String display.PNG (3.95 KiB) 5850 mal betrachtet
String comparator.PNG
String comparator.PNG (14.17 KiB) 5838 mal betrachtet

IKT
Beiträge: 554
Registriert: Mittwoch 4. November 2009, 18:32

Re: String comparator ,problem

Beitrag von IKT » Sonntag 5. April 2015, 13:32

Hello TOURNEUR,

you might have to put a '$TRIM' in between the 'Selection' & the '$COMP' parts, as in the picture below. (removes any unwanted SPACES from String)
As an alternative check it out with a '$CONST' instead of 'Selection' ...
Dateianhänge
PL-E_$TRIM.png
PL-E_$TRIM.png (12.89 KiB) 5826 mal betrachtet
++++++
Gruss/regards IKT

TOURNEUR
Beiträge: 35
Registriert: Samstag 22. Mai 2010, 23:56

Re: String comparator ,problem

Beitrag von TOURNEUR » Sonntag 5. April 2015, 18:05

Good evening , IKT

Thank you for your help ,

I inserted this function between my Hex generator and comparator.
Without any success ...

I have put command on left and right, but nothing more .

ankerwolf
Beiträge: 6
Registriert: Samstag 3. Juli 2010, 17:52

Re: String comparator ,problem

Beitrag von ankerwolf » Montag 6. April 2015, 12:27

Hello,
may be that there are CR LF at the end of the string, coming form the device?

LG Wolfgang

Mike D
Beiträge: 528
Registriert: Dienstag 14. Oktober 2008, 14:48
Wohnort: Elbe- Weser-Dreieck

Re: String comparator ,problem

Beitrag von Mike D » Dienstag 7. April 2015, 14:49

Hei,
try $Position instead of $Comp, then leading or trailing unvisible chars dont bother.
Any number greater than zero means, that $S exist in $M.

If you position the cursor on a connection during the projekt is running, you can see the actual value of the singnal.

Mike

Antworten

Zurück zu „Thema: Schaltung und Bauteile“