04-25-2018 06:27 AM - edited 04-25-2018 06:28 AM
Hi,
When searching for values in channels I would normally use the following code:
R1 = -0.2
L1=Find("Ch('Metrics/X Data')>=R1")
However, I now need to search for some text within the values of a text channel. I have tried the following but it doesn't seem to work:
T1 = "HW Grad [deg/g]"
L1 = Find("Ch('Metric Values/Metrics')= T1", 1)
The help files give the following example as an alternative method:
ChnFind("instr(1,ch(""Group1/Textchannel""),""meas"",1)<>0")
However, I was wondering why my first attempt didn't work and whether there is a method that is similar to my Find version that doesn't rely on InStr?
Thanks, Simon.
04-25-2018 09:49 AM
Hi Simon,
Honestly I would mostly follow the examples. They might be a bit trickier but I guess that they show optimized way to get to what you want. But if you want a really simple version you can use that :
T1 = "Arithmetic mean" L1 = PNo("[3]/StatisticsText", T1)