# How do I set up X2 analogue inputs to be within range of eachother.

## Recommended Posts

Hi all,

I am just beginning really but I am looking at setting up two analogue inputs, the purpose is that when either one is out of a set range or out of a certain range of each other an alarm will sound.

Do I need to set up a separate alarm for the Set range then another for the range between both?

They both should be the same in Principle, but if one goes out of range of the other due to calibration or whatever the issue is I want the alarm to sound so i can identify which one isn't right.

My thinking is there must be an easy way to do this?

##### Share on other sites

I'm assuming this is Visilogic.

If I am understanding you correctly, you need to have 2 separate calculations going for your set range for each input.  The controlling maths will be the same, but you need the separation as they are themselves separate.  You would be using the Within Range Compare, at the bottom of the Compare dropdown list.

As for the error comparison, this is again 2 lots of fairly simple maths, again finalised using the Within Range function.  The amount of error allowed depends on where you run the comparisons in your calculations.   eg Perhaps it would be more accurate if you compare the raw inputs, instead of linearised results.    Say you allow 10 as the +/- error on the raw input, you would add 10 to the input and put it into an MI, and subtract 10 from the input and put it in another MI.  You then compare the other raw input to those 2 MIs using the Within Range Compare, and if the error is less than +/- 10 it is ok.   I started this para by saying you need 2 lots running, but on checking before posting I have realised that it will likely be OK just doing this once!

You can link them all to the same alarm by using an MB for each result, and those 4 (or 3!) MBs run the alarm output, with a screen showing the reason for the alarm call.

cheers,

Aus

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

×