Jump to content

Recommended Posts

Hi , 

I need help to compare two ASCII strings. One ASCI string  came form router modem  as message and I would like to compare message with fixed text and than execute output  if  comparing  is the same.
Am I on right way  on programming  ladder or do or need diferent solution.

Many thanks for help.

 

comparestring.jpg.4dcc1a7436bbcdbb5f0a5ad3e0db0680.jpg

Link to comment
Share on other sites

  • MVP 2023

What you've posted looks like a good start to me.  I'm guessing you've verified that your "Message" tag is the same length as your "Vklop10" tag.

If it doesn't work I'd add both tags to a Watch when you're online with the PLC so you can actually see what's going on.

Joe T.

Link to comment
Share on other sites

Hi Mr. Joe  , i tried with Watch function and  find some mistake with max sting length . Yes that was the reason .  I wonder why is on receive side something bufering produce 

wrong  ASCII code despite  i send correct meassage,  

Anyway , THANKS Joe for help and I miss your old picture :)

Kind Regards

Gregor

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.