Re: [foxboro] AGA8 or cubic root in HLBL code
- From: "Michael Kessler" <mkessler@xxxxxxxxxxxx>
- To: <foxboro@xxxxxxxxxxxxx>
- Date: Mon, 24 Oct 2005 10:05:49 -0400
I recently ran into this same problem. Originally I had used the MATH block
but this solution was too klunky for my application.
I implemented the exponential function directly in the IND block by creating
a subroutine which approximates the exponential function as a series.
X X X*X X*X*X
e = 1 + - + - + - ....
1! 2! 3!
A similar expansion can be used for 10^X. I had to use 17 terms to get the
accuracy I needed. Not perfect but it seems to work.
> -----Original Message-----
> From: foxboro-bounce@xxxxxxxxxxxxx
> [mailto:foxboro-bounce@xxxxxxxxxxxxx]On Behalf Of Jeremy Milum
> Sent: Friday, October 21, 2005 8:56 PM
> To: foxboro@xxxxxxxxxxxxx
> Subject: Re: [foxboro] AGA8 or cubic root in HLBL code
>
>
> On 10/21/05, brad.s.wilson@xxxxxxxxxxxxxx
> <brad.s.wilson@xxxxxxxxxxxxxx> wr=
> ote:
> > I see basic 4-function calculator operators, modulus, logic and
> relationa=
> l
> > operators ... but no exponential operator.
> > Surely I'm overlooking it ... right?
>
> no. it's not there...
>
> > I see the CALC block can do logarithms and exponentials.
>
> yes and if you need to do those things in a sequence block you have to
> use a calc block for assistance, very kludgy but it will work.
>
> > (Obviously, I've never had a need to do this.)
>
> I have and it is demoralizing :( I have brought this up repeatedly at
> the User's Group, but I have been told that it cannot and will not
> ever be fixed. HLBL is all it is.... Now you could use the
> Newton-Raphson method to iteratively calculate a cube root, but it
> would be better to just us a calc block and tie that into the seq
> block.
>
> --
> Patron saints in general are broadband connections to the Almighty
> - Michelle Delio, Wired News
>
>
> _______________________________________________________________________
> This mailing list is neither sponsored nor endorsed by Invensys Process
> Systems (formerly The Foxboro Company). Use the info you obtain here at
> your own risks. Read http://www.thecassandraproject.org/disclaimer.html
>
> foxboro mailing list: http://www.freelists.org/list/foxboro
> to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
> to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
>
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
- References:
- Re: [foxboro] AGA8 or cubic root in HLBL code
- From: Jeremy Milum
Other related posts:
- » Re: [foxboro] AGA8 or cubic root in HLBL code
- » Re: [foxboro] AGA8 or cubic root in HLBL code
- » Re: [foxboro] AGA8 or cubic root in HLBL code
- » Re: [foxboro] AGA8 or cubic root in HLBL code
- Re: [foxboro] AGA8 or cubic root in HLBL code
- From: Jeremy Milum