Michael Walsh

MrPLC Admin
  • Content count

    1801
  • Joined

  • Last visited

Everything posted by Michael Walsh

  1. How to send a Email with NX102 or NA5 HMI

    Currently you must send it through a mail server.  There does not need to be an "extra" PC, you can use an existing mail server onsite.  If one does not exist, then yes, you would need to add  a PC at this point.  
  2. NA Data History Program

    Array[0] does not populate the first time because you do TruncTime after you push.  Switch the order.... Your variable for the stack is 11 records long ( 0-10 ). I would do this:   Create three variables of the structure.    The CurrentData is what you push onto the stack. CycleTimeHistory is the stack, I have set this up with 100 records, but you can make it more if you desire.  Set the retain attribute to true for the history so that the data is still there after turning the power off to the machine. CycleTimeDisplayArray is just what is displayed on the screen and is 10 records long.   Then, add this code: Rung 0 sets the index pointer to 0 when you power the machine on. Rung 1 just moves the current time in to the current record for testing purposes. Rung 2 is the push instruction just like you did it.   Rung 3 is the Page up functionality.  The page up button on the screen will subtract 10 from the index pointer.  Then this rung makes sure that Index is not <0 ( in this case, Index is a UINT, so when you subtract from 0 a UINT rolls over to a big number near 65535).  So, if I subtract 10 and is > 99, then I must have gone below 0.  If it goes below 0, I set Index = 0. Rung 4 works the same way, but it is just a single line up at a time, so I subtract 1. Rung 5 Is the page down functionality.  The page down button on the screen will add 10 from the index pointer.  Then this rung makes sure that Index is not >90.  If the result in Index is >90 then Index is set to 90.  Rung 6 is the same as 5, but is a single line, so 1 is added to Index each time the button is pressed. Lastly, the calculated Index value is used to move 10 records from the history array to the display array.
  3. Help with IR loop dilemma

    Be careful with this memory area.  D30000 is the area that CPU Bus units (usually communication modules, EIP21, ETN21, CLK21, etc) use for their settings in CS and CJ processors.
  4. Software Update "Admin rights" issue....

    That is odd.  Try to right click on the update executable and select run as administrator.  I am guessing the same thing will happen, but worth a shot.
  5. MPG WITH OMRON NX CONTROLLER

    No.   There is no reasonable way to do this.  
  6. Error when adding Area Scanner to NX Safety??

    Yes, your error is here: Once you define a device, you use one variable for the state of that device (whether it is a single or dual channel device).  Remove OSSD2 and then use OSSD1 (or perhaps a rename it to a better name like AreaScanner1 or something) in the program.  On function blocks that require 2 inputs, put that name in for both entries.  I believe that if you were to hover over the red rectangle in the image above it would tell you that you cannot name the second channel of a two channel device.  The Guard monitoring FB has two inputs in case you want to use two different safety switches on one door.  I would recommend using the SF_ESPE function block though. So, you would define it like this: I happened to choose the next two available inputs in my project, but you can see that only the first input is labelled.  And then the FB would look like this (I only filled in the activate and input, you can choose what you want for the others):
  7. MPG WITH OMRON NX CONTROLLER

    You stated you were using an Omron NX Controller.  If you are using a Delta PLC, this is the wrong forum.  If you are using NX IO with the encoder card, this is still the wrong forum.  You will need to ask Delta people how to do this.  
  8. Split long word for average function in function block

    I see you are using a CJ2M PLC.  I have shown below how to use double real numbers in CXP with a CJ2M PLC. Symbol creation: Choose LREAL as the data type.  Be aware that this data type uses 4 consecutive 16 bit addresses.  So in this example, the variable would use D0, D1, D2 and D3. Here are some of the double floating point instructions:
  9. Unable to conect to PLC

    We need way more information than this.  What PLC are you connecting to?  How are you connecting? (USB, serial, Ethernet, other)  
  10. MPG WITH OMRON NX CONTROLLER

    Wire it into a encoder input module (NX-EC0***, depending on if you need NPN or PNP).  Then connect the module to the NX Controller.  Use the MC_GearIn and MC-GearOut function blocks to gear the MPG to whatever servo you want to jog it with.
  11. NA Data History Program

    Yes, create a structure that has both the CycleTime (as a real or UINT, or whatever) and an element that has a Date_Time data type.  Then push a variable of that structure onto a stack that is an array of that structure.
  12. Function block and INI inside

    Yes, using real addresses inside a function block ruins its portability. 
  13. Synchronising 1S servos

    I took his original post to be two servos driving two sides of the a single device.  I may have misread it, but he says they are driving a worm gear (singular).  Of course if this is driving two worm gears in an X-Y Cartesian arrangement, then linear interpolation is the correct course of action.  
  14. NB-designer doesn't show bit switches

    I am surprised that it even lets you put that in for a default gateway.  That is definitely an invalid IP Address.
  15. NA Use USB to update tag

    Oh, sorry, I misread your post..... I don't think there is a way to do what he wants (but am not entirely sure). The only option would be to get a serial reader and take it into the controller.
  16. NB-designer doesn't show bit switches

    One way that the buttons disappear is if you don't have communications established.  The other way would be program issues, but it is difficult to tell that without the program.
  17. Synchronising 1S servos

    I just like the clarity of it, I think. This way both physical axes are treated equally and programmed the same.  Neither is the master.  Also, with the _mcLatestCommand option, the servos have to be in the proper order (node number-wise) on EtherCAT.  The master would need to be a lower EtherCAT node number.  Doing it this way just removes any chance of getting that wrong.   It used to be that the performance would be better with this option due to the fact that if both servos were tuned the same, the following error to the master axis would be the same and the axes would achieve closer synchronization.  However with the _mcLatestCommand option, both servos would get the exact same command if you geared them together without a virtual axis.  
  18. NA Use USB to update tag

    He doesn't want to have to press on a text entry.  The method in the video above works for him as he stated.  However, he wants the operator to just walk up to the machine and read his badge without even touching the screen (independent upon which page is showing on the screen).
  19. Synchronising 1S servos

    I would create 3 axes.  One for each of your real servos and one virtual axis.  I would gear both to the virtual axis using the MC_GearIn Function block and then command the virtual axis.  
  20. FWRIT(701) To Memory Card

    I am guessing that it has something to do with the logic in Rungs 0 and 1 of the Stop section (I am only showing rung 0 below).  You have this code there: The 3C makes it write 5 records (as I am sure that you know).  You are using the same address for the file name.  Are you inadvertently using this FWRIT at the point when it switches to a return every 5 fields.
  21. NA Data History Program

    Personally, I would create a structure that matches what you want to display, then create an array of that structure for data storage.  Then I would make displays on the screen to show the data.  Right click on the Data Display object once you create it and then choose create duplicate objects to rapidly develop your screen.  You could then use the StackPush Function to push your data onto the stack when needed.
  22. Omron NJ1000 Connect to Danfoss FC 302

    Are you using Explicit or Implicit messaging?  Do you have the eds file? 
  23. Conversion CQM1H -> CJ2M

    BIN = HEX (the way you are using it) = Unsigned integer (when working with timers and counters).  It is all about how you use the HEX data.  #F = 15 as an Unsigned integer for instance.  When you put 15 in on the HMI, you will see F if you monitor in HEX and 15 if you monitor as an Integer (signed or unsigned).  Since the X version of the timers and counters are binary (integer) timers and counters and you are inputting an integer with your HMI, use the X versions.  More specifically, use TIMHX to replace TIMH.  
  24. NB designer "layering" screens

    I would only use one.  That way you can control what is on top at all times.  If you need multiple windows, I might use events and have the event call up a pop-up.  The reason that I did not recommend this before is the pop-up will not close when the bit turns off.  It will have to be closed manually.  
  25. NB designer "layering" screens

    @Bobodopalus:   Ok, the best solution is to use the Indirect screen as I have mentioned and yes, technically you would need it on every screen.  Here is the easy way to do that.   First, create a new screen and add the indirect screen tool to it.  Specify which address in the PLC will control the direct window.  Also draw the box in the location and of the size that you want. This is Frame 13 in my project below: In my example, I pointed it to D500.  Then go to the properties of each screen that you want to use this and do the following:   On all of your screens, apply the sheet with the Indirect screen reference as a sheet as I have shown above.  This will allow the pop up to be controlled by putting a number in D500.   If you put a 20 in D500, then frame 20 will show up in the window, putting 21 in there will close frame 20 and open frame 21.  Putting a zero in there will make it disappear. That should do exactly what you want.