drr Posted December 27, 2017 Report 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?
Cam Posted December 27, 2017 Report 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.
MVP 2023 Ausman Posted December 28, 2017 MVP 2023 Report 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
drr Posted December 29, 2017 Author Report 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 !
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now