MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Nic

  • Rank

Profile Information

  • Country Australia
  1. Update: After a few more hours of fiddling around we got it to work! Not sure exactly what fixed it. Some of the things we did: Ticked the 'Settings' box when transferring the CX-Programmer program to the PLC (We realised we hadn't done this originally) Tried a different network switch and different IP addresses Tried new ethernet cables Went back to the original network switch Tried starting a new NB Designer program and using all the default settings and IP addresses Switched the node numbers (HMI became node 2 and PLC became node 1) Tried a different HMI, same model but older (it worked!) Switched back to the original HMI (it worked!) Somehow after all of all those things it started working. I think ticking the settings box when transferring the PLC program was probably an important step, but it still didn't work immediately when we did that. I would also note that while the HMI node is '2' in NB Designer, on the HMI itself (in Systems Settings Mode) it is '0'. This doesn't really make sense to me, but it works. Just in case any other beginners are reading!
  2. Hi all, I'm hoping someone can help me successfully download a program from NB Designer to a HMI and get it to talk to the PLC. I am still a beginner, I've had some success with PLC programming but this is my first HMI. The HMI I have is a NB5Q-TW01B, and the PLC is a CP1L-EM40DR-D. I have followed the instructions on here: to connect them physically and to do the settings/IP addresses in NB Designer and CX Programmer. There are two PLCs in the article but I only have one. I've written a simple program with a switch on the HMI that should turn on one of the PLC outputs, and a lamp on the HMI that should turn on when one of the PLC inputs is on. Both the NB Designer and CX Programmer programs compile successfully and have been transferred to the devices. The PLC and HMI are connected via Ethernet (as per the article) and I have set up the NB designer program to download via USB connection. When I download the program it appears to be successful (it says 'Download succeeded!' in NB Designer). However, my switch and lamp graphics do not appear on the HMI. I tried adding some random text and coloured shapes to the HMI screen, and those things do appear on the HMI while the switch and the lamp are still missing. There is a message that says '[2] PLC No Response: 00-02-3'. The LINK/ACT light on the PLC is flashing. It seems as though I must missed something in the PLC-HMI connection, or when trying to link the button and lamp graphics to the PLC program. Could someone help me to identify where I might be going wrong? Some things I am unsure about are: I'm not sure if the switch and lamp are missing BECAUSE of the PLC No Response error, or whether I have two separate issues here I am using the Work Area for data between the HMI and PLC, simply because that's what I've seen used in YouTube videos. I've matched the addresses of my signals in CX-Programmer (e.g. address W0.00) with the switch on my HMI (selecting 'W_bit' in Area/Variable and '0.00' in Address). Is that the correct way to go about it? Are there any other settings I would need to change to make them talk to each other via these addresses? During one attempt to download the program I ticked 'LOGO File', 'Clear Recipe', 'Clear Event History', 'Clear Data History', 'Clear ERW Data' and 'Clear FRW Data'. The program hadn't been working prior to this, so it was sort of a last ditch attempt to get some response from the HMI. Something did seem to happen, because the loading (logo?) screen on User Project Mode changed slightly after that. But I wonder if by clearing all that other data I might have created more of a problem for myself. Thanks in advance for your help!
  3. Help with STEP/SNXT programming

    Yeah the attachment issue is a bit annoying. I wanted to upload my code to show how the steps keep regressing, even when I put in conditions to stop them. If the problem is easy to solve I'd be happy to keep using STEP/SNXT but at the moment they just aren't behaving in a way I expect or understand. Please feel free to PM me if you have more info, I really do want to understand how to use them properly. Thanks!
  4. Help with STEP/SNXT programming

    Thanks for your help. It's good to know they are meant to work that way and I haven't done it drastically wrong. If that's the case I don't think STEP and SNXT are really what I am looking for because what I need is very much a one-way process. I'll have a look into implementing a state engine.
  5. Hi, I'm hoping to get some help with using STEP and SNXT in a program for an automated industrial process. I'm relatively new to this kind of programming so I might be missing something fundamental about how these instructions work. Essentially we have a machine that lifts, lowers, moves and stacks bins of fruit. It needs to follow a series of ordered steps and loop back to the start when finished. The conditions that allow the transition from one step to another are based on limit switches. I haven't used STEP/SNXT before so I made a bit of a practice program with just the basic steps (I wanted to attach it to this post but it seems I'm not able to). My issue is that when certain conditions are met, the step program activates previous steps which have already been completed. For example, when Step 4 is active and the conditions for Step 2 and Step 3 are also still valid (but those steps have already been completed), if the condition for Step 3 is removed, Step 2 will become active again (while Step 4 continues to be active). This happens in the actual sequence of the machine at one point where a shuttle extends to move a bin forward, then retracts back to its starting position. The program re-activates the shuttle extending step because all of the limit switch conditions for it are valid while the limit switch conditions for the retracting step are no longer valid. I'm not sure if this is the way STEP and SNXT are intended to work, it seems strange to allow previously completed steps to re-activate. I've tried various things to prevent it, like creating a completion flag for each step which I used as a condition on the SNXT for that step, then reset all the completion flags at the end of the program. This worked on the first run through, but then when the program looped back to the start the completion flags didn't seem to have any effect and the steps got re-activated anyway. I'm sufficiently confused! What would be a simple/elegant way to ensure that previously completed steps are not re-activated, and that no two steps are active at the same time? If I haven't explained it well enough please ask me questions and I'll try to describe exactly what's happening. Thanks in advance! Also - SFC is not available for my PLC.