Turning a variable into a digital

mikee boy
Posts: 13
Joined: Sat Apr 26, 2008 7:48 pm
Location: Lincs, UK

Turning a variable into a digital

Postby mikee boy » Thu Jul 24, 2008 8:14 pm

I record when the brakes are applied by taking the feed from the brake pressure switch but this gives a value between 9 and 14 volts. How do I manupulate this so my graphs are flat-topped rather than frilly as a result of voltage variation. i.e. I' like everything > 4v to be 1, and everything below to be 0.

Thanks in advance

Mike

DaveTurner
Posts: 34
Joined: Sun Nov 20, 2005 6:21 am

Postby DaveTurner » Thu Jul 24, 2008 9:11 pm

Use the 'IF' operator, i.e. in the calibration for the channel use the scaling (IF x>4,1,0) then when ever the voltage is above 4v you get a 1, otherwise you get a 0 output.

mikee boy
Posts: 13
Joined: Sat Apr 26, 2008 7:48 pm
Location: Lincs, UK

Postby mikee boy » Sat Jul 26, 2008 5:38 pm

Awesome Dave

Thanks

pault
Posts: 64
Joined: Fri Nov 02, 2007 4:53 pm
Location: St Charles, IL

Exact Syntax

Postby pault » Tue Aug 05, 2008 11:54 pm

Can you give the exact syntax for the IF? It doesn't come up in my install.

Thanks,
Paul

DaveTurner
Posts: 34
Joined: Sun Nov 20, 2005 6:21 am

Postby DaveTurner » Wed Aug 06, 2008 4:51 am

From the local help:

IF: eg IF(b, case1, case2), If b is not 0, then it returns case1, else it returns case2.


Return to “General software support”

Who is online

Users browsing this forum: No registered users and 6 guests