I am trying to write code for a real time data chart for a large array of Thermocouples (120 to be exact). I want to show the temperatures that they are reading separately but the catch is that I don't want to show data for PLC Addresses that may not have a thermocouple input. For example, if there are only 25 thermocouples plugged in, I only want to show the first 25 as they will show real data, the rest will be some weird other number.
Is there a way to run an If loop or some form of logic to have something look at the value of all 120 PLC address and if it's in a certain range add it into the collection? I've tried using the ChartBySample1.PLCAddressItems.Add command but I don't think I'm entering the right arguments for it.
Thanks in advance for any help or advice you can give.