News:

  • April 18, 2024, 07:01:43 AM

Login with username, password and session length

Author Topic: Math IBox to V-memory location  (Read 2991 times)

mabillock

  • Jr. Member
  • **
  • Posts: 14
Math IBox to V-memory location
« on: November 16, 2016, 08:54:40 AM »
 I am using an Math real IBox to send the resultant to a V-memory location and the result never gets to V location unless I type it in myself threw the memory editor.  Any suggestions, I am using DirectSoft5 on a DL06 PLC.  Thanks again guys.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
Re: Math IBox to V-memory location
« Reply #1 on: November 16, 2016, 09:20:59 AM »
1. Your V register in MATHR is actually an IEEE floating point DWORD result, so it utilizes TWO V locations.  Make sure you do not have ANY OTHER INSTRUCTIONS WRITING to the V location or to the NEXT V location (e.g. if MATHR V2000, make sure no instruction is using V2000 and V2001).  Remember V's IDs are octal, so if MATHR V2007, then it is V2007 and V2010, not V2008.

2. Make sure the input logic driving the MATHR instruction enables the MATHR, e.g. stick an INC box below the MATHR box and it should increment the V register in the INC box - if it is NOT incrementing, then your MATH box is not enabled either.

mabillock

  • Jr. Member
  • **
  • Posts: 14
Re: Math IBox to V-memory location
« Reply #2 on: November 16, 2016, 10:18:24 AM »
franji1, the math box has done the calculation because I can tell it through the status of it is lit up but you're saying I still need the INC box for the calculation to deliver the result?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
Re: Math IBox to V-memory location
« Reply #3 on: November 16, 2016, 10:25:28 AM »
When you turn status ON, the status is always shown regardless of whether an instruction is actually executing on that exact scan or not.  The power flow into the MATHR may not be ON, hence causing the MATHR box to NOT execute.

The "simplest" way to verify powerflow all the way to an instruction to an output column is to stick an INC box immediately below the output box/coil in question.  Make sure that INC is using a V location NOT USED ANYWHERE ELSE.  If after download in RUN mode, the INC box value is static, then that means it has no power to it.  That means that your MATHR box does not have power to it either.  That means that the issue is not the MATHR box, but the contacts in the rung driving the MATHR box.  The power flow of the contacts is NOT getting to the power rail.  Look at the contacts in the MATHR rung, or possibly the other rungs driving the C bit contacts in your MATHR rung.

mabillock

  • Jr. Member
  • **
  • Posts: 14
Re: Math IBox to V-memory location
« Reply #4 on: November 16, 2016, 11:36:40 AM »
franji1, another issue but related to v-memory, I am getting a number in a v-memory slot that I have no idea where it's coming from.  the V2710 slot is only used in my math box and yet when I go to run the machine a number from no where appears.  That's even after clearing the PLC v-memory.  I appreciate all the help, this is my first PLC project and I am still new to the automation/control world.  Thanks

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
Re: Math IBox to V-memory location
« Reply #5 on: November 16, 2016, 11:40:27 AM »
This forum is a great place to learn.  Many of our users are quite helpful.

First, after clearing the PLC, you will also want to initialize scratch pad (PLC->Setup->Initialize Scratch Pad).

Also, make sure nothing else is talking to your PLC (i.e. get it off any network, disconnect any HMI's like C-more).  This will help make sure another PLC is not writing to YOUR PLC's memory.

plcnut

  • Hero Member
  • *****
  • Posts: 803
    • premiersi.com
Re: Math IBox to V-memory location
« Reply #6 on: November 16, 2016, 11:42:15 AM »
If you zip and post your project then we may be able to help more.
A few questions:
1) Are there any other devices connected to this PLC? (ie: HMI, SCADA)
2) Are there any analog inputs on this PLC?
3) Are there any PID loops?
4) What is the processor? (ie: D2-240, D0-06, Etc.)
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com