adccommunitymod (AutomationDirect) asked a question.

Help with first program please

Created Date: December 04,2019

Created By: KevinB

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

Hi all, After watching a few hours of videos I have what I think should be a working program, but it seems to stop working at one point. I attached the program. Pictures were easier than screen shots at the time. This was connected to a BX-DM1-10ED2-D. RowPresentProx is a sensor on a conveyor. When it turns on, it sets bit RowPresentBit. I think that should make the N/O RowPresentBit contact on the next rung light up. { "data-align ": "none ", "data-size ": "full ", "data-attachmentid ":126953} As you can see below, The RowPresentBit contact does not close when I force the RowPresentProx on. { "data-align ": "none ", "data-size ": "full ", "data-attachmentid ":126954} I'm probably being stupid, can someone tell me what's wrong? I'm sure that the program could be condensed and there is probably more wrong after I get past this. I really don't know what I'm doing yet..once this problem is fixed I'm I'll probably need help again. Thanks, Kevin


  • adccommunitymod (AutomationDirect)

    Created Date: December 04,2019

    Created by: KevinB

    Hi all,

    After watching a few hours of videos I have what I think should be a working program, but it seems to stop working at one point. I attached the program. Pictures were easier than screen shots at the time. This was connected to a BX-DM1-10ED2-D.

    RowPresentProx is a sensor on a conveyor. When it turns on, it sets bit RowPresentBit. I think that should make the N/O RowPresentBit contact on the next rung light up.

    { "data-align ": "none ", "data-size ": "full ", "data-attachmentid ":126953}

    As you can see below, The RowPresentBit contact does not close when I force the RowPresentProx on.

    { "data-align ": "none ", "data-size ": "full ", "data-attachmentid ":126954}

    I'm probably being stupid, can someone tell me what's wrong? I'm sure that the program could be condensed and there is probably more wrong after I get past this. I really don't know what I'm doing yet..once this problem is fixed I'm I'll probably need help again.

    Thanks,

    Kevin

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 04,2019

    Created by: franji1

    It appears you have not written the program to the PLC. The bars in the left margin of a rung shows edit/save to disk/save to PLC state.

    If there are no bars in the left margin of a rung, that means it is synchronized with everything.

    If there is a yellow bar, that means it has been modified, but has not been Accepted (F8)

    If there is a light blue (cyan) bar, that means the rung has been accepted, but it has not been written to the PLC.

    If there is a green bar, that means the rung has been accepted, but it has not been written to Disk.

    Look at the Offline (top) Toolbar for the Write to Disk button, and look at the Online (2nd) Toolbar for the Write to PLC button. Hit both of those and everything will be "synchronized ".

    There is similar green/cyan color status on the status bar for the System Configuration, Program, and Documentation. If you see the S, P, D, bar to the right of the Yellow Forces bar, you see that S and D have normal background (light gray) color, that means they are synchronized with disk and PLC. But the P (Program) has both a Cyan (left side) and Green (right side) background - that means there are 1 or more rungs in your entire project that have not been written to the PLC (cyan) or to Disk (green).

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 04,2019

    Created by: franji1

    I forgot to mention this important point - when you have modified rungs that have NOT been written to the PLC (cyan bar), then NO STATUS is shown for THAT rung. For contacts, that appears like the contact is not closed, but it just means there is no status for that contact. This will start doing status as soon as you eliminate the cyan bar (i.e. as soon as you write your project to the PLC).

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 04,2019

    Created by: bcarlton

    The program file you posted does not correspond to the rungs you pictured.

  • adccommunitymod (AutomationDirect)

    Created Date: December 04,2019

    Created by: KevinB

    That makes sense, thank you! I'll try again tonight.

    Kevin

  • adccommunitymod (AutomationDirect)

    Created Date: December 04,2019

    Created by: KevinB

    By the way, I guess this happened because I wrote it offline using the simulator, then plugged it in and downloaded it, then made changes and wrote to disk but not the plc.

  • adccommunitymod (AutomationDirect)

    Created Date: December 04,2019

    Created by: franji1

    By the way, I guess this happened because I wrote it offline using the simulator, then plugged it in and downloaded it, then made changes and wrote to disk but not the plc.

    Exactly.

    Just for clarification, when you are connected to a PLC, that is considered ONLINE, even if it is the Simulator. When you have a disk project opened ONLY, that is considered OFFLINE programming (not connected to a PLC nor to the Sim).

    The OFFLINE toolbar has functions that are available when offline OR online (find, toggle edit mode, cut/copy/paste, zoom, etc.). The ONLINE toolbar has functions that are primarily useful when connected to a PLC. Hence, most of the ONLINE toolbar buttons are disabled when you are OFFLINE programming.

    The Disk project does maintain the PLC connection, once it is established. So when you "Open " the disk project, it will attempt to connect to the PLC using THAT connection (link).

    Also, the PLC does maintain the name of the disk project, so if the disk project file (.dmd) exists in your Projects folder, then if you just Connect to a PLC (not open the disk project), it will ask you if you want to also open the disk project (to help maintain the synchronization between the .dmd file and the PLC).

    When you open a PLC project with a corresponding disk project (or vice versa), Do-more Designer will compare the two projects and tell you if there are any differences, specifically the System Configuration and/or Program and/or Documentation. If they all match, it will just open the PLC/Disk project without any "nag " dialog (since they are "in-sync "). If there are differences, the "nag " dialog will let you see specific Program differences (if that part of the project is different). That can be helpful in case you were doing work offline, or someone on another PC was doing work online.

    The Compare Program dialog is also available at any time via the Tools menu. It lets you compare what you currently have opened in Designer with what is currently in the PLC, or with what is currently on disk, or even with a completely different .dmd project file.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 05,2019

    Created by: KevinB

    Thanks again, that clears up some more mysteries.

    I attached the latest that is further along but still not right. I'll try to explain what should and what is happening when I run this on the simulator.

    If I toggle X1 Startbutton on then off, C0 Runbit turns on, which should run a stepper motor that drives the conveyor. It looked like that was working last night when connected to the PLC but I didn't check for pulses on the output.

    When RowProxPresent turns on, I want it to decelerate the conveyor to a stop by turning off RUNBIT, and turn on RowPresentBit. I'm using a bit because it seems easier to let the clear the sensor clear the flag as the conveyor decelerates to a stop.

    Once motion stops, I want C1 MoveComplete to turn on. On rung 8 and 9, if I turn on MoveComplete at that point (since not on an actual PLC,) the timers turn as they should. TIMEDOUT seems to be doing what I want, but ONDTMR does not turn on C4 timercomplete after 6 seconds as I think it should.

    I could swear I saw C4 turn on after the timer reached 6 sec one time, but now it's not turning on. What I want to happen when it does turn on, is for C3 RowPresentBit to reset and and Runbit C0 to reset, starting the convyor again and waiting for the next time RowPresentProx trips.

    There is probably a better way to do this, and maybe it has to be differently, I don't know. Any ideas? Hopefully it's clear what I'm trying to do.

    { "data-align ": "none ", "data-size ": "full ", "data-attachmentid ":127007}

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 05,2019

    Created by: MikeN

    The way it looks like you are using C3, C4, and Y4 it doesnt look like you need to use TIMEDOUT, and you should just use a regular OUT coil. The way you are doing things, behavior would be the same with either instruction so better to use the regular out when you dont need something special.

    The behavior of ONDTMR doesnt seem any different than a regular TMR to me either. both will turn on the output when the time is up, and the output will go off when power stops flowing to the timer. If you switch to a regular TMR, then "T0.done " will turn on when the timer is at 6 seconds. Use that to trigger the next line instead of C4.

    Also, marge lines 10 and 11. Have a single contact go to both coil outputs.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: December 05,2019

    Created by: RogerR

    T0 timed out is C4, which resets C3, which resets the timer T0, which shuts off C4.

    C4 is probably only on for one scan. This would make it hard to see turn on.

    I believe the Axis Config only needs to be turned on once unless a change is made.

    Don't know what the effect of trying to run it continuously while also performing a velocity mode move would be.

    Expand Post
10 of 23