05-14-2014 01:36 AM
Hi....
I am new user to developing environment..
I am making a instrument program for delectric measurement system Vs temperature where I have to take measurement at each pure integral value like (1 2 3 4 5.... ) of temperature (increasing or decrasing). But when the temperature set to some desired point, variation occuring in fraction wise like it is rising suppose from10.11, 10.23, 10.35, 10.66 etc. I have to take measurement exactly on the temp. reached to 11, 12, 13, etc..
So is there any comparator logic available to just comparing for occurance of perfect integral value.
Please suggest any helpful thing related to this thread.
05-14-2014 01:40 AM
Do you want to round of the decimals or you want to ignore them and read only the readings that dont have decimals?
05-14-2014 01:46 AM
Yes ofcourse i want to take readings on perfect integral value that dont have decimals but some 'inrange' limitation can be added.
But the comparator should be like to watch regularly that when value goes to perfectly integral or around.
05-14-2014 07:26 PM
There is a function to check if something is in-range, you just need to place it and use at whatever time interval you need to to capture values in-range. You might have long waits when not near interger values and then poll quite frequently when in range, then slow again once you captured a value in-range...
That's the idea, the rest is just wiring up code.
05-15-2014 12:52 AM
Thanks for your kind suggestion.
But I can't put up any logical delay in main program as well as there is no any such fixed time interval for all temperature ranges, I have in position according to main program that I can only check input variable value of temperature such that whenever the input value matched to the pure integral value also within some Tolerance range then after I can trigger my measurement program.
05-15-2014 01:38 PM
There is always some delay. Just as you have to assign an acceptable tolerance limit above and below the integer values you want for the temperature, you need to assign some limits on the timing. The minimum value will be approximately the interval between samples of the temperature data. A more realistic minimum might allow for some averaging of temperatuer readings if noise on the readings is comparable to the tolerance or larger. Otherwise you might trigger your action on a noise impulse.
The logic to make the decisions can very likely execute orders of magnitude faster than the intervals between your temperature readings. The In Range a & Coerce function probably executes in a few nanoseconds. Your dielectric measurements probably take milliseconds or much longer.
Lynn