Host Engineering Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2012, 04:23:13 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: I-Box guts  (Read 507 times)
Controls Guy
Internal Dev
****
Posts: 1134


Darth Ladder


« on: February 17, 2011, 10:38:08 am »

Is there a reference for what native instructions all the IBoxes compile to?
Logged

I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.
b_carlton
Internal Dev
****
Posts: 388



WWW
« Reply #1 on: February 17, 2011, 11:24:47 am »

Create a program with, for simplicity, one rung with the IBox you are interested in. Then perform an export to a text file choosing "Expand IBoxes" in the options area.
Logged

An output is a PLC's way of getting its inputs to change.
Controls Guy
Internal Dev
****
Posts: 1134


Darth Ladder


« Reply #2 on: February 17, 2011, 12:04:00 pm »

Thanks.  I'm trying to do things like understand what to expect to find in the accumulator after IBox execution.
Logged

I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.
franji1
Bit Weenie
Host Moderator
*****
Posts: 1035



WWW
« Reply #3 on: February 17, 2011, 12:19:58 pm »

Thanks.  I'm trying to do things like understand what to expect to find in the accumulator after IBox execution.
I know that when you do MATHBIN and MATHBCD, if the result could be bigger than 16 bits, the result is still in the 32-bit accumulator.  So if it's possible that your calculation may be bigger than 9999BCD or 65535binary, just do an OUTD immediately after the MATHBIN/MATHBCD IBox.

LD K5001
OUT V1400
OUT V1401
MATHBCD V2000 "V1400 + V1401"
OUTD V2001

V2000 would equal 2 BCD, but V2001 as a DOUBLE BCD would equal 10002
« Last Edit: February 17, 2011, 12:21:54 pm by franji1 » Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM