4/22/2015 12:34 PM | |
Joined: 6/24/2013 Last visit: 9/3/2024 Posts: 1618 Rating:
|
Hi If You wish to scale analog values You can do either: 1. use standard SCALE FC (which does not handle underflow/overflow) 2. use one attached (it gives out of range indicator and alarm, covers under/over range and under/overshoot) 3. write Your own block for specific application. Block is written once but can be called (used) many times - once for each analog input.
Raw Value is: -32768: underflow (out of range, wire break, etc.) -32512: max undershoot (ca. -117%) -27648: -100% (-10V, -20mA, etc.) 0: 0% (0V, 0mA, 4mA for 4..20mA inputs, etc.) +27648: +100% (10V/20mA/etc.) +32512: max overshoot (ca. 117%) +32767: overflow (wiring problem, etc.) Notes: 1. The negative values are for BIPOLAR inputs i.e. -10..10V, -20..20mA, etc. 2. Analog configured to 4..20mA can give small negative values and this is normal. Treat them as 0 (input is a bit less than 4mA) 3. TEMPERATURE from inputs CONFIGURED to PT-100, PT-1000, Thermocouples reads Temperature in Celcius x 10 for example 1234 = 123.4 degrees - just divide it by 10 to get Celcius: L PIW <Address> ITD DTR L 10.0 /R T <Temperature_As_Real> // Real variable [4 bytes] - temperature in degrees as real. Notes to FC105: it uses the following global variables: "GLOBAL".CLOCK.PULSE_100ms - 100ms pulse for out of range debounce "CONST".ANALOGUES_OOR_TIME - out of range debounce time in 100ms units Hope this helps. AttachmentFC105.pdf (420 Downloads) |
Follow us on