Michael Walsh

MrPLC Admin
  • Content count

    1801
  • Joined

  • Last visited

Everything posted by Michael Walsh

  1. IAG files & NA5 displays

    This video may help you: https://www.youtube.com/watch?v=9pa3HnhS1wU It illustrates creating, publishing and using IAGs.  You can skip ahead to the 8:25 mark to look at using importing and using IAGs.    
  2. Syamac & 1S Servo Motion programming

    When you create an axis, Sysmac studio automatically creates a variable(of type _sAXIS_REF, a predefined structure) with the same name as the name that you used for the axis.  I have created an axis called belt: The variable belt looks like this: So, to monitor the drive alarm status, you could use the Belt.DrvStatus.DrvAlarm bit.  There is no bit to reset the fault.  You need to use the MC_Reset Function Block to reset a fault on the drive.  
  3. First, go get the ESI File here: https://www.yaskawa.com/delegate/getAttachment?documentId=ESI_SIES3_OPT_V_1_03_01&cmd=documents&documentName=ESI_SIES3_OPT_V_1_03_01.xml Then in Sysmac Studio, go to the EtherCAT section, right click on the master and choose Display ESI Library: Choose the Install File button at the bottom and browse to the location where you saved the ESI File. Select it and press ok.  Then choose yes when it asks if you want to install it. Close the library window when finished. The SI-E53 will now show up under drives in the EtherCAT Toolbox on the right side of the screen (right side by default): Drag the SI-E53 onto your EtherCAT network and assign the appropriate node number to it. Then click on the Edit PDO Map Settings Button: You have multiple options at this point.  You can turn on and off different input and output PDO Mappings by turning on the radio button next to the entries.  The first output entry and first input entries are on by default: You can select the output PDO Mapping and then press the Add PDO Entry button (shown above by the arrow).  You can choose the entry you want to add and press ok.   I added Speed Reference to the list: The run and other bits are contained in the control word (I would assume, you need to reference Yaskawa Manuals).  You can also repeat this process to add any Input PDO Entries that you want to add.  I added Velocity Actual (feedback) to my input: .   Once you have added the items that you want to add you can go to the IO Map.  The items that you added will show up in the listing:  The two items I added are highlighted below with red arrows.  Just assign variables to the IO map locations as highlighted in yellow and then you can use them in your code.  (note the R/W specification that shows if it is a Writeable (output) or Read only (input) variable): Of course you then have to download everything into your controller.
  4. CX-Programmer improvement requests

    See response #6 here: http://forums.mrplc.com/index.php?showtopic=27449&p=131153
  5. NJ Bits to NA Alarms

    I may have added two alarms and deleted one... not sure.
  6. NJ Bits to NA Alarms

    You can use unions for this. First, create a union like so: Then, create a variable that is of that type: If you click on the comment field, you can select a small button on the left side of the field.  You can go give each of the 32 bits in the variable union a comment: Then, when you use that bit in ladder it shows up like this: You can then monitor all 32 bits, like this in your code:   Now, to make an alarm in the HMI.  First go to the variable mapping section: Type in the name that you want the variable to be mapped to in the HMI.  I just used Currentalarms as my name: Next, go to your alarms and add an alarm as shown below:   Then add an alarm viewer on a screen.  See the simulation below:
  7. NJ Controller to NA HMI Alarm Setup

    Of course.  Just create a bit for each alarm.  Then for the Expression, instead of saying AlarmCode = 1, you might say Fault23 (BOOL data type) = TRUE.  
  8. NJ501 with Keyence IV2 Ethernet/IP Union

    Copying and pasting the data types into your project is completely acceptable and will not cause you any issues, I just was trying to fill in the blanks about how to use UDTs when loaded from a library file.
  9. NJ501 with Keyence IV2 Ethernet/IP Union

    K,  It may appear that the data types did not show up when you add the library.  You need to create global variables and type the data type in like this keyence\UDTKeyenceInputAssembly (it will autofill when you start typing Keyence and again after you enter the \) just as I showed in the picture a couple of posts up.  I created a Namespace called Keyence and that is why this method of entry is necessary. After you add the library, you should be able to see that the two structures were added in the Keyence Namespace (Project -> Library -> Show References and then expanding the Data option): Then when you add a new variable, you should see the type ahead work like this:
  10. NX-EIC202 upload

    The NX-EIC module has the ability to store a "map" of the modules that are supposed to be connected to the module.   When an upload is performed, the EIC module will report back what its saved "map".  If there is no saved "map", the module should still function, but there is nothing to upload.  Adding / removing modules would not cause faults (if done with the power off) in this configuration.  Compare and merge will actually look at what is connected to the EIC module.  If you then transfer this newly created "map" to the EIC module, the EIC module will expect those I/O modules to be present and alarm if they are not present.  If you upload after this "map" has been sent to the EIC module, then it will upload properly and show as you expect.   Hopefully this is more clear.  
  11. NJ501 with Keyence IV2 Ethernet/IP Union

    Here is the complete assembly in library form. Keyence IV2.slr To use this file, go to the Project pull down menu, choose Library -> Show References. Then press the + button.  Choose the attached library file.  The Data Types would then be added to your program.  Then you can create variables as shown below:   I have also attached the library source file so that you can see / modify it as you would like: Keyence IV2.smc2 If you modify the library, you will need to go to Project pull down, then Library, then Create Library after you have made the changes.  You can then use the newly created .slr library file in your project.  
  12. CJ1M-CPU11

    Try to "Clear All Memory Areas" under the PLC pulldown.  It sounds like your PLC may have completely lost its memory and it may be in an odd state. After clearing all memory areas, try to download your program.  
  13. NX-EIC202 upload

    Connect with USB, then do a compare and merge with actual configuration.  Then download that to the EIC coupler.  It seems to be saying that you have not done this yet.
  14. CJ2M PLC with CJ1W-ETN21 card

    Well, first of all you will need a router.  They are not on the same network, so they cannot talk to each other as you have them configured without a router.  
  15. RXD Function not functioning

    This means the terminator is not the same as you have set for the serial port.  Your message must end in CR+LF  (0D0A hex) for the port to detect the end of each message and issue the RXD command.  
  16. NX-EIC202 upload

    Try connecting with USB.
  17. NJ501 with Keyence IV2 Ethernet/IP Union

    I am trying to help, but Keyence's website won't let me download the IV2 Field Network Manual.  I would suggest using a Structure.  You can build a structure that is the exact size you need and you can define some of the data as bits and others as Reals, UINTs, etc.  If I could get a look at their manual, I could build a structure for you in a library for you to use.  
  18. Edge Detection in Structure Text

    This is why ladder is way easier for many things.  Here is how I would do this: TimeOut:=Timer(TimeBit,UINT#100,TimerST,TimerDone,ElapseTime); IF TimerDone=TRUE AND Oneshot=false THEN;     Counter:=Counter+1;     Oneshot:=TRUE; END_IF; IF TimerDone=FALSE AND Oneshot=TRUE THEN;     Oneshot:=FALSE; END_IF;     
  19. How to handle floating numbers in CX Programmer ?

    You could also start with this function block in the download section and change the value to be scaled to a REAL format: http://forums.mrplc.com/index.php?/files/file/996-analog-scaling-function-block/  
  20. How to handle floating numbers in CX Programmer ?

    The SCL instruction is for integers because you need to use it for integers to reduce rounding errors.  With floating point, you can just multiply or divide by a floating point number and then add or subtract a floating point number to do your scaling.  
  21. RXD Function not functioning

    You can make it communicate, but you would need to know the terminator (end character(s)) or the length of the message if there is no terminator..  
  22. RXD Function not functioning

    A392.06 turns on each time that new data is received.  It sounds like your scale is not constantly sending data.  Does the light blink on the serial port light?   Is it possible that your scale is not using CR+LF as a terminator?  Each time that the port sees CR+LF, A392.06 will turn on.  
  23. CJ1M-CPU11

    I will assume that your PC clock is valid, not sure how it would be invalid. I would register your software and update it to the current version (9.73).  If you still have this issue, you may need to uninstall and reinstall CX-One.  I have not seen that error before.  
  24. CJ1M-CPU11

    Just start a new project set the PLC as a CJ1M-CPU11, choose Sysmac Way as the communication type and 9600, 7, E, 2 as the settings.  Choose the correct communication port number as well.  See if that works. 
  25. CJ1M-CPU11

    This sounds correct.   Turn on dip switch 5 on the CPU.  This will make the 9 pin port use the default RS232 communication.Default is Host link, 9600, 7, E, 2.  Make sure to set CX-Programmer with these same settings to communicate with the PLC.