You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 10th, 2007, 08:57 PM   #1
bmil
Member
United States

bmil is offline
 
Join Date: Dec 2007
Location: Pa
Posts: 3
AD DL06 - math with negative numbers.

The current project involves resetting boiler temp higher with a drop in outdoor temp. This makes the slope negative. I have the y=mx+b thing down OK. The math I need to accomplish is "boiler setpoint = (-1.09)(outdoor air temp) + 180". The schedule works on paper. I have the AI module set up to use BCD values and the input values are accurate as they are displayed in the data view as well as on the LCD panel on the PLC. Any help with this will be appreciated.
  Reply With Quote
Old December 10th, 2007, 09:09 PM   #2
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 5,379
Instead of deriving a negative from the Outdoor Air Temp and adding it to 180 I derived the positive amount and subtracted it from 180. I did the math in 'REAL' with the appropriat4e conversions.

LD (Outdoor Air Temp)
BIN
BTOR
MUL R1.09
OUTD V2000 (as a temp)
LDR 180.0
SUBR V2000
RTOB
BCD
OUT V2002 (Boiler Set Point)
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old December 10th, 2007, 09:15 PM   #3
bmil
Member
United States

bmil is offline
 
Join Date: Dec 2007
Location: Pa
Posts: 3
Thank you for the quick reply. I will put the code in try it. Am I correct that you simply rearranged the equation to avoid the negative multiply?
  Reply With Quote
Old December 10th, 2007, 09:29 PM   #4
bmil
Member
United States

bmil is offline
 
Join Date: Dec 2007
Location: Pa
Posts: 3
I can find no MULR or SUBR in the DL06 instruction set. There must be a way to get the values into real format, manipulate them, and put them back to BCD but I have not found it. Otherwise, your solution would work.
  Reply With Quote
Old December 10th, 2007, 10:21 PM   #5
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is offline
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 3,915
Quote:
There must be a way to get the values into real format,
In Bernie's post he used BTOR this is - Binary to Real Number Conversion Box
Then he works the numbers, then you can conveert it back
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, Fluke Meters, Programming Lessons, MicroLogix 1400, 1100, 1000 and 1762-I/O, coming soon WERA Tools.... all your automation needs
  Reply With Quote
Old December 10th, 2007, 10:24 PM   #6
Eric Nelson
Lifetime Supporting Member + Moderator
United States

Eric Nelson is offline
 
Eric Nelson's Avatar
 
Join Date: Apr 2002
Location: Randolph, NJ
Posts: 4,298
Quote:
Originally Posted by bmil
I can find no MULR or SUBR in the DL06 instruction set.
See pages 91 and 94 in Chapter 5 of the DL06 User Manual...



-Eric
  Reply With Quote
Old December 10th, 2007, 10:42 PM   #7
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 5,379
Yes BMIL, I just rearranged the equation. I was going to cover the other question in the next post but GIT and Eric jumped in. The RTOB then BCD converts the REAL answer back to BCD in case that's how you want the format.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
negative numbers Stationmaster LIVE PLC Questions And Answers 8 August 13th, 2007 06:05 AM
Radio Serial Communications and AD DL06 waggs LIVE PLC Questions And Answers 8 January 8th, 2007 08:53 AM
simple math with DL06 qlingtime LIVE PLC Questions And Answers 5 June 14th, 2005 07:54 AM
PID - Velocity control of a mass on a spring. Peter Nachtwey LIVE PLC Questions And Answers 19 July 22nd, 2004 10:28 AM
AD DL06 ASCII out help! John Deitz LIVE PLC Questions And Answers 7 August 20th, 2003 04:43 PM


All times are GMT -5. The time now is 02:55 AM.


.