drr Posted December 27, 2017 Report Share Posted December 27, 2017 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? Quote Link to comment Share on other sites More sharing options...
Cam Posted December 27, 2017 Report Share Posted December 27, 2017 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted December 28, 2017 MVP 2022 Report Share Posted December 28, 2017 OK...I've got to ask. How are you getting an empty value in a table? And did you also try H-00? cheers, and have a good 2018! Aus Quote Link to comment Share on other sites More sharing options...
drr Posted December 29, 2017 Author Report Share Posted December 29, 2017 Yes, I've tested with 0, I think that there is a bug when searching for empty strings... Cheers, and have a Happy new year also ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.