Jump to content

Search empty string in Data Table


Recommended Posts

I have a Samba sm43-j-r22. 

I need to search in Data Table a row that has a column (of type string) with an empty value.

I have tried using the function "Data Tables Find Row" with the "Start address of value to find" with an MI operand with value equals to 0, because I think that an empty string has it first byte equals to null. But It wasn't succesful.

How can I acomplish this?

Link to comment
Share on other sites

I had to do this a few years ago and couldn't find a way to do with the string.

 

I finally added and extra column into the data table which was a MI and searched for it.   0 Meant that it had an empty string field  1 meant that the string field had data in it.

You'll have to make sure that when you get a new PLC you write a blank DT into it as often there is garbage in the DT which will mess with the above solution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...