Jump to content

Bryon Sol

Administrators
  • Posts

    142
  • Joined

  • Last visited

Posts posted by Bryon Sol

  1. Something that Mitsubishi programmers need to do on a regular basis is communicate with a device on a CC-Link network.  This can be CC-Link classic, CC-Link IE Field, CC-Link IE Field Basic or CC-Link IE TSN.  No matter which flavor of CC-Link is used the process is similar and consists of a few steps.  This article is not intended to be a step-by-step how-to but instead to give an overview of the process.

    Step 1:  Configure the network with the devices and their required data size(s).

    Step 2:  Configure a set of Refresh Data to transfer the information from the CC-Link module (whether that's the built-in Ethernet port for CC-Link IE Field Basic, or an actual add-on module like RJ61BT11 or FX5-CCL-MS etc).

    Step 3:  Understand the data and use it!

    I like to diagram this out as follows:

    image.png.a6f2bf2832fc0d1c86ba1b92da0d7f5b.png

     

    STEP 1: - Configure the network

    For Step 1 - configuring the network, all of the configuration screens look similar, you drag and drop the devices onto your network and set station numbers.  For Ethernet devices you need to set IP addresses as well.  On the devices themselves you need to either parameterize them or configure their station information to match.

    Here's an example screenshot showing a VFD on a CC-Link network

    image.thumb.png.7c0b1ae8ef77244a1e108f5d71213eec.png

    You simply drag the device onto the network and then in the upper portion of the window you configure the details for the station.

    For instance this is set for Version 1 of CC-Link and a single occupied station.

    image.thumb.png.428cb8351a6bc87ef20222f6a0cbac8b.png

     

    STEP 2:  Configure the Refresh Data

    This moves the data into the PLCs usable device memory.

    This will look something like the following:
    image.png.5e95e7f3a6a0c9d4a005958856bc3eb4.png

    RX Devices are Remote Input bits and in the above picture we are transferring them into B bits in the PLC
    RY Devices are Remote Output bits and in the above picture we are  transferring them into B bits in the PLC
    RWr Devices are Remote Input Words (Remote Word Read) and in the above picture we are  transferring them into W words in the PLC
    RWw Devices are Remote Output Words (Remote Word Write) and in the above picture we are  transferring them into W words in the PLC

    What this step does is make the devices on our CC-Link network accessible via PLC internal devices, in this case B bits and W words.  B bits and W words were chosen because they are addressed in Hexadecimal just like RX, RY, RWr and RWw devices.

    You can see here RX0 through RX1F is getting mapped to B0 through B1F.  Similarly RY0 through RY1F are being mapped to B100 through B11F.  The RWr and RWw follow a similar pattern.  The B bits and W words chosen are set by the programmer.

    STEP 3:  Use the Data.

    In order to use the data we need to go to the manual for the device we are controlling and see what the manufacturer tells us.  

    For example with a Mitsubishi VFD on CC-Link IE Field basic we get these two maps:

    The RX and RY devices look like this:
    image.thumb.png.535cba5881ed9036f26218ab1fa0b5c8.png

    The RWr and RWw can change but the most simple option is this:
    image.png.abbcb9e168f6a03f64eee9799c66e704.png

    It's now up to you as a programmer.  We can hard code devices for use. For instance since RY0 = B100 we can simply turn on B100 to turn on the Start Forward signal of the VFD, or we can create labels.

    For example here's a data structure for the RY devices showing the device that we've mapped.

    image.png.d726a7482c2f145cbd8badbd07cef29c.png

    With data structures in place, labels created for our CC-Link devices and then our mapping complete we can have code that looks like this to turn on/off the VFD

    image.png.bd5ce3a48a27495f98960d46c60c2565.png

    Hopefully this helps you conceptualize device mapping in Mitsubishi PLCs.

     

    image.png

  2. Recently we had a situation where we needed to change a job file on a Cognex In-Sight camera from a UR Robot. 

    At first we attempted to do it via Modbus/TCP, but were unable to do so.  So we switched gears and used UR Script.  In the UR Script we use Socket commands to connect to the Cognex camera and use Native Mode commands to perform the job change.

    To change a job in Cognex you need to:

    1. Connect on port 23 (Telnet)
    2. Provide username and password
    3. Take the camera offline
    4. Send the job change command
    5. Put the camera back online
    6. Disconnect from the camera

    There's more than can be done in terms of fool-proofing and error handling, but this script provides the needed functions to change your job.

    Here's the UR Script we created in order to make this work:

    # This script uses Sockets in the UR and Native Mode Commands
    # to change the job in a Cognex In-Sight Camera
    
    # First thing to do is open a Socket - this is a connection to the Cognex Camera
    # The default port for a Native Mode socket is port 23 - TELNET
    # Specify the IP address of the camera and port 23
    # Name the Socket "CogCam" so that we can refer to the specific socket connection
    socket_open("192.168.3.94",23,"CogCam")        #Open Camera UR connection , Port: 23
    
    # The camera should respond with a welcome message and then ask for username
    # We do a read from the socket to clear this data
    # You could evaluate this response to ensure the port opened correctly
    # You could also add a timeout
    # socket_read_line(socket_name=’socket_0’, timeout=2)
    strOpenResponse=socket_read_line("CogCam")            #get connection response
    
    # Now we need to log into the camera.  The default username is "admin"
    # we also need to send Carriage Return and Line Feed characters, so we'll add those
    # using bytes with integer value of 13 and 10 respectively
    socket_send_string("admin","CogCam")                #Login to Camera 
    socket_send_byte(13,"CogCam")
    socket_send_byte(10,"CogCam")
    
    # Now we can read the response to the user name - it should now ask for password
    # you could evaluate the response, but here we're just clearing the socket 
    # of incoming data
    # then we'll send an empty string - the default password for admin
    EmptySocketData=socket_read_line("CogCam")                    #Empties Queue 
    socket_send_string("","CogCam")                                #Password To Camera
    socket_send_byte(13,"CogCam")
    socket_send_byte(10,"CogCam")
    
    # Now that we should be logged in, again empty the Socket
    # then take the camera offline with SO0 command
    EmptySocketData=socket_read_line("CogCam")                    #Empties Queue 
    socket_send_string("SO0","CogCam")                            #Takes Camera Offline
    socket_send_byte(13,"CogCam")
    socket_send_byte(10,"CogCam")
    
    # We could parse the response, 0 = fail, 1=pass but we are 
    # assuming it worked.
    # The advantage of a read is that the script won't send the next
    # command until we get a response to the previous command
    # Now we send LFJOBNAME.job to the camera to load the job we want
    # in this example, our job is 02.job
    Status1=socket_read_line("CogCam")
    socket_send_string("LF02.job","CogCam")                        #Loads New Job File 
    socket_send_byte(13,"CogCam")                
    socket_send_byte(10,"CogCam")
    
    # It may take several seconds for the job file to load
    # using the socket_read_line without a timeout means we wait for the camera
    # to respond to the request
    Status2=socket_read_line("CogCam")
    
    # Now that we have a response, we put the camera back online with SO1 command
    socket_send_string("SO1","CogCam")                          #Puts Camera Back Online
    socket_send_byte(13,"CogCam")
    socket_send_byte(10,"CogCam")
    
    # This isn't necessary, but we could check for a 0 or 1 response to see 
    # if we are back online or not
    Status3=socket_read_line("CogCam")
    
    # Lastly we should close the socket
    socket_close("CogCam")

     

    JobChangeScript2.script

  3. Using the built-in Modbus/TCP capabilities of the Epson robots we can connect a Mitsubishi GOT
     
    Quick program attached which works with the Epson robots.  
     
    Notes:
    1.  This was created for an OLD GOT Simple so if you try to put it in a new one, change your Settings to GS21xx-WTBD-N in the project
    2.  This uses the default config for slave IO on the Epson side starting at Bit 512.  
    3.  You then have to understand how Epson Maps internal bits 512 (512 is duplicated for inputs and outputs as you see above) to Modbus registers.
     
    We can then address higher Words if we want to send/receive data from Epson as values other than just bits.
     
    The GOT Project only has two screens, one that's looking at some RAW data as bits and words
     
    The other screen is only looking at the first couple of words in/out as they map to default functions so that you can quickly use buttons to start/stop programs, reset the robot, turn motors on/off etc. 
     
     
     

    GS21_To_Epson_Modbus_Ex01.GTX

  4. Okay, so here's where I admit that I was intimidated by servos for years in my early career.   Why?  Because they were expensive and I was afraid to get it wrong, plus there were so many options that I was overwhelmed.

    But in terms of Mitsubishi Servos it's actually pretty simple.  You are either using an IO controlled servo, or a networked servo.  So how do we know which is which?

    Starting with the amplifiers, let's break down an example part number:  
    MR-J4-20A1-RJ

    The MR simply means it's a servo amplifier meant for general automation.
    The J4 is the series of amplifiers.
    The 20 means it's a 200 Watt amplifier.  This is the power it can deliver to the servo motor.
    The A indicates the control type, in this case digital I/O control, we'll discuss this much more later.
    The 1 after the A indicates that this is a 100V amplifier, meaning the power to the amplifier is 100VAC (100-120 works).
    The RJ indicates that this amplifier has a Safe Torque Off functionality, earlier versions did not have this functionality and didn't have the RJ suffix.

    There's a little more to this than what's shown above but in general this is what we are looking at when it comes to picking an amplifier.  They all start with MR, then a series (J4, JE, JN, J5, JET etc), then a power rating, a control type, a voltage modifier may or may not be present (1=100V, 4=400V, nothing = 200V), and finally other modifiers as necessary for special features.

    CONTROL TYPE

    The first thing I like to look at when picking an amplifier is actually the control type.  You will find a few control types with Mitsubishi Servo Amps, basically there are two main categories with a couple of sub categories. Servo amplifiers are either digitally controlled (inputs and outputs) or network controlled.  Here are the various Control Types you'll see in the Mitsubishi Line Up:

    A Type Amps (example MR-J4-20A1-RJ)
    These are Digital IO Control, this can be pulse and direction.  Some have table mode where you program positions inside the drive and call them via digital IO and some have the ability to do Program Mode where a script can run in the drive.  No matter which mode you use (pulse and direction, table or program) the drive is controlled by 24V digital IO signals wired to the front of the drive.

    B or BF Type Amps (example MR-J4-70B-RJ, MR-JE-200BF)
    These drives work on an SSCNET Fiber Optic Control Network.  These get their control signals from a Motion Control Module connected to your PLC.  All series of Mitsubishi PLCs have various cards that can control these drives, you can use an FX3, FX5 (iQ-F), L Series, Q Series or R Series (iQ-R) PLC with an appropriate motion card to drive these.  Some of the advantages include the fact that Fiber Optic networks are not affected by electrical noise, they are very fast and the motion cards can do coordinated motion, so if you need to do 2-axis linear motion or 2-axis circular motion or even more complex motions like camming etc, these amplifiers can be controlled by a motion card in a coordinated fashion.  The MR-JE series can be purchased as MR-JE-xxxB or MR-JE-xxxBF the F adds Safe Torque Off (STO) functionality to the drive.

    C Type Amps (example MR-JE-40C)
    These drives work on the CC-Link IE Field Basic network.  This is a low cost option for point-to-point control.  All of the FX5, L-Series, Q-Series and R-Series PLCs with built-in Ethernet can control the servos directly from this built-in Ethernet port (some older systems may not be able to do this, check for the CC-Link IE Field Basic marking on the front of the PLC).  The big advantage here is cost.  If you need to do simple point to point moves, or speed control, or torque control, these amps can do it without a motion card being needed.

    G Type Amps (example MR-JET-40G)
    These drives work on an Ethernet network and there are a few sub options.  The straight G type are meant for Mitsubishi control and will work on CC-Link IE TSN networks for coordinated motion, but they can also function on CC-Link IE Field Basic for a low cost solution for point-to-point uses.  The sub-type G-N1 are EtherCAT controlled drives.  There are also GF type amps (MR-J4-70GF-RJ for example) that are ethernet based that can work as either CC-Link IE Field (not TSN) or CC-Link IE Field Basic.

    TM Type Amps (example MR-J4-40TM-EIP)
    These drives work on an Ethernet network and can be purchased as either ECT for EtherCAT, EIP for Ethernet/IP or PNT for PROFINET compatibility.  You can get application notes and how-to guides from Mitsubishi which will show you how to use these drives with third party PLCs such as Beckhoff, Allen-Bradley and Siemens among others.

    Amplifier Series

    As of Spring 2023 here are the current families of Servo Amplifiers and general info about them:

    MR-JN Series
    These are only pulse and direction and are designed for simple applications.  They are available in 100V and 200V systems with a variety of motors and output powers up to 400 Watts.

    MR-JE Series
    These are available as A, BF and C type control and are 200VAC up to 3kW.  They have a wide variety of control methods and are a lower cost option with 17-bit encoder resolution for general servo applications.

    MR-J4 Series
    These were the top of the line servo series until the MR-J5 series came out.  With 24VDC/48VDC controllers, 100VAC Single Phase up to 400VAC three phase options and from 10 Watt motors up to 55kW, this series provides options for motors and amplifiers for almost any application.  And with A, B, GF and TM control options, almost any type of control is possible with this series.  On top of this with 22-bit encoders on the motors precision was unsurpassed until the J5 series came out.

    MR-JET Series
    These are network only amplifiers working on G and G-N1 networks.  Similar to the JE series being the lower cost alternative to the J4 series, the JET series is the lower cost alternative to the J5 series and is the step up from the JE series.  With 200VAC and 400VAC options with power up to 3kW and 22-bit resolution on the encoders on the motors, this series represents a fantastic price/performance option.

    MR-J5 Series
    These are the top of the line amplifiers from Mitsubishi with A type and G type options allowing pulse train control or CC-Link IE Field TSN as well as EtherCAT with the G-N1 versions.  The series is still expanding but current operates on 200VAC or 400VAC from 100 Watt output to 22kW.  And with 26-bit resolution on the encoders the precision of control has reached new levels never seen before.

     

    So which one do I choose?

    For lower cost solutions, you are typically looking at pulse/direction systems.  These are your A Type amplifiers.  So stick with the MR-JN or MR-JE series, or even the MR-J4 or MR-J5 for higher performance.  But understand that unless your control system can do multi-axis pulse and direction, most likely this is single actuator point-to-point motion only.

    For more control, step up to networked devices.  For instance, with Mitsubishi PLCs with built-in CC-Link IE Field Basic you can get positional feedback, alarm info etc over the network.  So going to an MR-JE-C, MR-J4-GF, MR-JET-G, or MR-J5-G allows more interaction, but still lower cost because you don't have a motion control card on your PLC.

    For the best control, add a motion card to match the network of your drive and either go the the B type amplifiers like the MR-JE-BF, or MR-J4-B series, or move up to CC-Link IE Field with the MR-J4-GF series.  Or for top end applications move to CC-Link IE TSN and go with MR-JET-G or MR-J5-G series amplifiers.

    Mitsubishi also provides servo sizing tools to help you pick the right motor type (low inertia, mid inertia etc) and the right wattage for your loads.

    If you need any assistance picking or sizing your servo, don't hesitate to reach out to your sales rep for support!

     

     

     

  5. The iQ-F series PLC (FX5 series) is a major step forward from the previous generation FX3 and before PLCs.  It has a significantly faster bus between modules.

    You are unable to simply connect previous FX2N and FX3U series right side modules to the FX5 (iQ-F) PLCs.  

    If you have an FX5UC PLC you want to use a FX5-CNV-BUSC, and if you have an FX5U or FX5UJ or FX5S you want the FX5-CNV-BUS.  These are the bus conversion modules.

    Anything after the module must be an FX3 series module and the connectable modules are listed below.

    image.thumb.png.20f45b6bfb29c3937722e6901ac014bd.png

     

    image.png.12b4d1be77847eacb0fe37a2d63cca12.png

  6. There are a couple of reasons why you might not be able to write to the HMI over ethernet.

    1.  You have a fresh GOT with no program in it.  When GOTs ship from the factory they have no BootOS and no Ethernet setup.  You must always use USB or serial the first time to set them up.

    2.  You don't have the correct IP settings on your PC, make sure your PC's IP address and subnet match that of the HMI.

    3.  The HMI was set up to connect to a serial only device and therefore has deactivated the Ethernet port!
    This one is a little strange, but if you have a 3rd party (non-Mitsubishi) device connected via Serial port to the HMI and you haven't configured the Ethernet port to do anything, then it will be dormant. 

    To activate it, go to I/F Communication Settings and set the Ethernet Download settings.

    image.png

  7. Use the following chart to determine the correct battery for your robot arm and controller.  If you have any questions, please reach out to your Gibson rep for clarification.

    Robotarm Battery Part # Quantity Controller Battery Part # Quantity
    RV-M1  /     /  DUM1 A6BAT RBT-00467 1pce
    RV-M2  /     /  DUM2 A6BAT 1pce
    RV-E2 A6BAT RBT-00467 5pcs CR-E116 A6BAT 1pce
    RV-E3J A6BAT 4pcs CR-E116 A6BAT 1pce
    RV-E4NM A6BAT 5pcs CR-E356 A6BAT 1pce
    RV-E5NJM A6BAT 4pcs CR-E356 A6BAT 1pce
    RV-E3NLM A6BAT 5pcs CR-E356 A6BAT 1pce
    RP-1AH A6BAT 3pcs CR1-571 or CR2-532 ER6BAT RBT-00463 1pce
    RP-3AH A6BAT 3pcs CR1-571 or CR2-532 ER6BAT 1pce
    RP-5AH A6BAT 3pcs CR1-571 or CR2-532 ER6BAT 1pce
    RV-1A A6BAT 5pcs CR1-571 ER6BAT 1pce
    RV-2AJ A6BAT 5pcs CR1-571 ER6BAT 1pce
    RV-4A A6BAT 5pcs CR2A-572 or CR2-532 ER6BAT 1pce
    RV-5AJ A6BAT 4pcs CR2A-572 or CR2-532 ER6BAT 1pce
    RV-3AL A6BAT 5pcs CR2A-572 or CR2-532 ER6BAT 1pce
    RH-5AH45 A6BAT 4pcs CR2A-572 ER6BAT 1pce
    RH-5AH55 A6BAT 4pcs CR2A-572 ER6BAT 1pce
    RV-2A A6BAT 5pcs CR1-571 ER6BAT 1pce
    RV-3AJ A6BAT 4pcs CR1-571 ER6BAT 1pce
    RH-10AH55 A6BAT 4pcs CR2A-572 ER6BAT 1pce
    RH-10AH85 A6BAT 4pcs CR2A-572 ER6BAT 1pce
    RH-6SH A6BAT 5pcs CR2B-574 ER6BAT 1pce
    RH-12SH85 A6BAT 5pcs CR2B-574 ER6BAT 1pce
    RV-6S A6BAT 5pcs CR2B-574 ER6BAT 1pce
    RV-6SL A6BAT 5pcs CR2B-574 ER6BAT 1pce
    RV-12S A6BAT 5pcs CR3-535M ER6BAT 1pce
    RV-12SL A6BAT 5pcs CR3-535M ER6BAT 1pce
    RV-3SB A6BAT 5pcs CR2B-574 ER6BAT 1pce
    RV-3SJB A6BAT 5pcs CR2B-574 ER6BAT 1pce
    RV-3SD/Q A6BAT 5pcs CR1D/Q Q6BAT RBT-00568 1pce
    RV-6SD/Q A6BAT 5pcs CR2D/Q Q6BAT 1pce
    RV-12SD/Q A6BAT 5pcs CR2D/Q Q6BAT 1pce
    RV-2SD/2SDB/2SQ ER6BAT RBT-00463 4pcs CR3D/Q Q6BAT 1pce
    RV-2F ER6BAT 4pcs CR750_751 Q6BAT 1pce
    RV-4F ER6BAT 3pcs CR750_751 Q6BAT 1pce
    RV-7F ER6BAT 3pcs CR750_751 Q6BAT 1pce
    RV-20F ER6BAT 3pcs CR750_751 Q6BAT 1pce
    RH-3FH ER6BAT 3pcs CR750_751 Q6BAT 1pce
    RH-6FH ER6BAT 3pcs CR750_751 Q6BAT 1pce
    RH-12FH ER6BAT 3pcs CR750_751 Q6BAT 1pce
    RH-20FH ER6BAT 3pcs CR750_751 Q6BAT 1pce
    RV-2FR MR-BAT6V1 RBT-01456 4pcs        
    RV-4FR MR-BAT6V1 4pcs        
    RV-7FR MR-BAT6V1 4pcs        
    RV-13FR MR-BAT6V1 4pcs
  8. DEVICES AND LABELS

    A lot of questions come up about Mitsubishi PLC data types.  This is more common now with GX Works3 and the FX5 (iQ-F) and R series (iQ-R) PLCs.

    First, it's important to understand the memory in Mitsubishi PLCs.  There are only 16-bit registers and single bits.  There are no other storage types for data.  There are no 8-bit storage areas, or 32-bit or 64-bit.  

    So if we start with storage areas in the PLC that are addressable (we call these DEVICES) they are as follows:

    image.png.383814d33a7e1980e29b1b48cf4f9820.png

    There are some other devices not covered here such as R registers and F annunciator bits, but for the most part this covers the most commonly used devices and their addressing whether it's decimal, octal or hexadecimal.

    As you can see there's nothing about data types here, this is purely memory devices (aka memory locations).  What we use them for and how we use them is a separate thing.  For instance I could store a 16-bit integer in data register D0, or I could store a 32-Bit floating point (real) value in D0.  However, if I point a 32-bit floating point value at D0 it will consume both D0 and D1 registers (two consecutive 16-bit registers) to contain that value. So as a Mitsubishi programmer it is up to us to ensure we don't reuse the same register for multiple things.

    These DEVICES have been around for many generations of Mitsubishi PLCs.  And prior to GX Works2 everything was programmed at the Device level.  There was no concept of Labels.  We had comments to be able to know what we were using various DEVICES for, but you had to enter the DEVICE when programming.  However, with GX Works2 Mitsubishi released the ability to use Labels.  In GX Works2 this worked by setting aside a portion of the normal Device Memory to be used for label memory area when you didn't specifically link a label to a device.  Or you could specify which register you wanted to use.

    In the example below we have two labels one with a Device assigned to it and one without.  When the program compiles it will choose a data register to use.

    image.png.b7326c16b21030858c6461e393923b3b.png

    What register an unassigned label uses can move around.  But it will like in a range defined by the following table (which is user manageable):

    image.png.f9da63fcfcc19ef1df72712a6285913c.png

    When GX Works3 came along and the new iQ-F and iQ-R hardware, a new memory area specifically for Labels was added to the processors so that we weren't using standard device memory for unassigned labels.  So the above table does not exist in GX Works3.

    But what about Data Types?

    DATA TYPES AND FUNCTIONS

    In GX Works2 and earlier software, because we were doing things mostly at the device level the classic Mitsubishi data-type specific functions were used by most programmers.  For instance, on the iQ (Q series) PLCs we would have the following math functions:

    + for 16-bit addition
    D+ for 32-bit addition
    E+ for 32-bit Floating Point addition

    In the example below we still use devices for the input and output arguments.  

    image.png.7186e3bddc624653f610b0fc920da7c3.png

    But when we switch to Labels we now need to make sure our Data Type of our labels matches the expected data type of the function:

    image.png.44eca182908e4d5a2dd35eba6017312b.png

    For this to work the labels would have to have the following data types:

    image.png.41ac7f74fae70ffbb5c7e6674e65cce6.png

     But it was really in Function Block Diagram programming (aka Structured Ladder) where the data type checks started to come into play and wouldn't let you get away with the wrong data type.

    image.png.c5e6a217030bb4e8fc698c2e78dbcea3.png

    This error occurs because we accidentally set the data type as Word instead of Float.

    image.png.785882158acc3efb9453d5aed461fdad.png

     

    So what data types do we have, and what values can we use with them, and what functions match those types?

    Below is a screenshot of the data types you can pick from as standard (simple) data types on an FX5 (iQ-F) PLC

    image.png.3cdc84be6e8645303c633ad16405fa37.png

    These can contain data as follows:

    image.png.5313deb9a68954aafe4a565ebeaf061e.png

    But now in FBD programming we need to use the correct function types to work with these Data Types.  

    For instance INC increments a Word, but INC_U increments and Unsigned Word.

    But it gets a little confusing sometimes when converting data types as there are an incredible number of data type conversion instructions:

    image.png.b4a68a87446cc498498ac8e44bc6a194.png

    Some of these are easy to understand as when you start to enter them they are very specific:

    image.png.e048d5d739d4b3f7e90cec825e976a8e.png

    For instance DINT2FLT converts 32-bit SIGNED (aka Double Word [Signed]) to float.

    However you have to get your data types correct when using the IEEE 61131 compliant function blocks.  And this is where things can get tricky.

    For instance the WORD_TO_DINT function requires a WORD (aka Word Unsigned) input and converts this to a DINT ( Dword Signed) output. So WORD and DWORD are for UN-signed values and INT and DINT are for SIGNED values.  But you can't mix and match registers in with these functions because D100 has no data type.

    image.png.0c18d36c3227f7a0c4e7e54813c93e6d.png

    So how do you know if a function is a classic Mitsubishi instruction or a new IEEE version?  Well you can tell by looking at where it exists in the Element selection window:

    image.png.bc41b27652807a5612472cf80ba677e7.png

    Functions up top under BASIC Instructions are classic Mitubishi instructions that have been around prior to pure label based programming and work at either register level OR Label level.

    Instructions further down under "Standard Function/Function Block" area in Element Selection are IEEE compliant versions and require the proper data type or they simply won't compile.

    image.png.99a5506e107fc7e511040aad912dd94c.png

    If you need any assistance with this, reach out to your local Mitsubishi Distributor and they will be glad to assist.

     

     

  9. Have you ever received one of the following compile errors in GX Works3?

    a)  A device which is latched has been assigned for VAR_GLOBAL class.  Please change to VAR_GLOBAL_RETAIN class.

    or

    b) A device which is not latched has been assigned for VAR_GLOABL_RETAIN class.  Please assign a device which is latched.

    Well what do these mean? Simply put, you created a label and told the compiler that you wanted it retained (VAR_GLOBAL_RETAIN class), but assigned it a register in the non-retained area.  Or vice versa, you created a label and told the compiler you didn't want it retained (VAR_GLOBAL class) but assigned it a register in the retained area.

    For example neither of these work:

    image.png.84bdccfcf8535e14c0f9d49c4dc1bc85.png

    When you look at the parameters for this PLC any register above D200 is in Latch Area 1

    image.png.7c1b211cba51c39e70539098fd22b8a7.png

    So if you try to set any Global label as retained under D200 you will get an error, and if I try to set any Global label as simply VAR_GLOBAL at D200 or above you will also get an error.

    This is solvable simply by moving the assigned register, or switching from VAR_GLOBAL to VAR_GLOBAL_RETAIN (or vice versa).  

    But what about in the following scenario?  I have both non-retained and retained values inside of a Structured Data Type (SDT).

    image.png.790f7dac05fbaaf34b20b59f69c30724.png

    If you absolutely need to do something like this, there's one option available to you.  It's a setting in the Convert options of GX Works3.   

    "Check the Consistency of Global Label".  The default is YES, but if we set it to NO then it stops checking VAR_GLOBAL vs VAR_GLOBAL_RETAIN and the registers

    image.png.afd2b4338ea306eae463bdd558d22db1.png

    Upon making this change you can now compile the program and point labels to any register/bit without experiencing the error.  However, the danger becomes that you may not have placed something in the correct memory area to do what you need it to do.  Please use this setting with caution.

     

  10. A common issue people have with Cognex In-Sight cameras is not getting the data back at the end of an inspection.  It might seem like you have it all set up correctly in either EasyBuilder Communications or Spreadsheet with FormatOutputBuffer etc, but you just aren't getting any data!

    If you are able to trigger your camera, and interact with it in other ways, but the data isn't coming back, this is most likely because you haven't told the camera to send the data!

    On V5.x.x. firmware, the input/output changed a bit for the Cognex cameras.  If you are using Ethernet/IP, Profinet, Modbus/TCP or CC-Link IE Field Network Basic and you want the data at the end of the inspection there are two different ways to go about this:

    1. Turn on the "Enable User Data Bypass" option.

      This is by far the easiest option.  What it does in essence is tell the camera not to wait for the PLC to request the data, but to just send it automatically at the end of every inspection.

      This option is essentially in the same place no matter what protocol you are using, but does vary slightly.

      Go to Sensor->Network Settings
      image.png.d8e1edafba2ef79cb14bb982c43009a8.png

      Under the Industrial Ethernet Settings, make sure you've selected the correct protocol and then click Settings and check off "Enable User Data Bypass"

      image.png.35a6371021a66163f83bb7619fe4f6af.png

       
    2. Or...Request Data with each inspection.
      Depending on your PLC this is done via the Set User Data Ack tag/bit
      image.png.4cfa4f018546e09109f910a076527be5.png

      From the In-Sight Explorer Help File for Ethernt/IP:
         If the Enable User Data Bypass is NOT enabled (unchecked which is the default state) in the Network Setting Dialog for the camera:
            i. Set the User Data tag, SetUserData bit is a named tag, for this example it would be InSight_Top:O.Control.SetUserData.
            ii. Clear the User Data tag above once you receive the User Data Ack bit. SetUserDataAck bit is a named tag, for this example it would be InSight_Top:I.Status. SetUserDataAck.

     

     

    The Set User Data Bypass flag is available in the following protocols:

    Mitsubishi CC-Link IE Field Network Basic:
    image.png.9a6b747cd3cd185c9045f344663d6f7b.png

    Profinet

    image.png.857bbfcaaed1b8c6491d4017bb782662.png

    Modbus/TCP

    image.png.8dd398426949931aff0dd7c0f4441b88.png

     

     

  11. The new Vision Sensor Monitor Utility makes it possible to view images from the Cognex In-Sight cameras on your GT25 or GT27 HMI.

    Here are some notes on the capabilities:

    1. This utility on the GOT uses the WebHMI functionality of the Cognex In-Sight cameras. So only cameras that have this ability are compatible. This means the older 5100, 5400, 5600, 1100, 1400, 7000, 7200 and 7400 series cameras will not work as they only go up to firmware 4.10.X and do not support WebHMI. All newer models (5700, 7500, 7600, 7800, 7900, 8000, 9000) with firmware 5.8.0 or after should work.
       
    2. This utility does NOT support CustomView functionality, or graphics generated in spreadsheet.
       
    3. This utility DOES support EasyView.
       
    4. The utility launches it's own set of screens. You do not design your own screens, you simply launch the utility. Like any other utility screen, you are now not in your standard HMI application, so while monitoring the camera, you have no ability to interact with your PLC etc. You have to leave the utility to go back to machine controls.

    This was tested on a In-Sight IS7802M with firmwares 6.1.3 and 6.2.1 - both worked fine. There was previously a limitation that the utility only worked on cameras up to V5.8.0 Firmware, the utility has been updated and as of the writing of this it now works with all firmware from 5.8.0 to 6.2.1.

    You will need GT Designer 1.250 or later for this to work. I used 1.265B.

    Steps are basically as follows:

    1. Update the Core OS of your GT25/GT27. This requires an SD card.
      Write the CoreOS to the SD card from Communication->Write to Memory Card
      Choose the CoreOS (mine was version AB)
      Put the SD card in the HMI and boot the HMI - follow the prompts to update the CoreOS

      image.png.22d4163538b35a859bc79e30cadf555b.png


      image.png.8a443e35f485df2ef52d732965d5a635.png

       
    2. In your HMI Project in GT Designer3 go to Project->Application Selection and check off Vision Sensor Monitor[01.42.000] to add the utility to your project.

      image.thumb.png.327d3eb73a10915dbff631d2b3f4ce4f.png
       
    3. Add a button to one of your screens to gain access to the utility. Make it a Special Function switch and set the Switch Action to "Vision Sensor Monitor"

      image.png.7679722777aa7b5c6d8506130a1b970f.png

       
    4. Make sure you enable WebHMI in your Cognex Camera. I did not test HTTPS only HTTP but HTTP worked flawlessly.

      image.png.0b80f3d1e9b13eddaa1fbb0bd4a7b8e9.png
       
    5. Write your project to your GOT and you should be all set.

    One final note. While In-Sight Explorer is connected to the camera, you will not be able to use the online/offline, read/save etc functionality in the Vision Sensor Monitor utility. Make sure you disconnect In-Sight Explorer from the camera so that the GOT has control.

  12. Cognex uses a discovery protocol to find cameras.  Are you on a network with managed switches?  It's possible that the discovery broadcast can't get to the camera.

    I recommend going direct PC->Camera without a switch in the middle when people have problems.

    If that doesn't work there are two things to try:

    1.  Leave the Add Sensor window open and power cycle the camera - in 30 seconds to 2 minutes it should pop up.

    2. If that doesn't work you might have Firewall software blocking things.  From Cognex' website here is the list of ports you need open.

    Port Number Service
    TCP 21 FTP
    TCP 23 Telnet
    UDP 68 DHCP (In-Sight vision system only)
    TCP 80 HTTP
    TCP 502 Modbus
    TCP 1069 In-Sight Protocol
    UDP 1069 In-Sight Discovery
    TCP 1070 Machine Status data
    UDP 2222 EtherNet/IP
    TCP 5753 Audit Message Server
    TCP 44818 EtherNet/IP
    UDP 44818 EtherNet/IP
    UDP 45237 iQ Sensor Solution
    TCP 50000 DataChannel

    Specifically make sure the TCP and UDP ports 1069 are open for In-Sight Discovery and In-Sight Protocol.

     

  13. A common issue I see people having is connecting their new iQ-F (FX5 series) PLC to an HMI or other device over Ethernet.  The PLC simply won't respond and they can't get the connection to work.  

    This root cause of this is usually the fact that the iQ-F PLC (FX5 series) does not talk the same protocol over Ethernet as the previous FX3 PLCs and before.  The FX5 uses what is called 3E Frame protocol whereas the the FX3 uses 1E.

    When selecting the driver, make sure you select the protocol for the correct PLC.

    In GT Designer3 for instance there's an iQ-F driver and an FX driver.

    image.png.1110ec78cf8ea653b6cd516cb2954816.png

    In iX Developer there are 3 possible drivers for Ethernet, FX ENET, FX3U/GE-ENET (for the ADP cards) and MC Protocol for iQ-F/L/Q etc
    image.png.8a9e0ada97ac54a5344d5f03c8be149d.png

    In In-Sight Explorer for Cognex you can see that there are various versions of MC Protocol

    image.png.f226283e3cbf13b65f943092cc562cdf.png

    Making sure you have the correct version selected will allow you to connect your HMI or other device to your iQ-F (FX5) PLC.

     

     

     

  14. Did you know that your GOT/HMI can act as a go-between for two devices that talk different protocols?

    Step 1 is to add your devices that you want to exchange data between. 

    For example, a Mitsubishi iQ-R PLC and an Sick Flexi Soft Controller.

    image.png.f7deb400059712da1e877e0d660859a5.png

    Next we add a new Device Data Transfer from the Project tab

    image.png.5fa95bd09458a543f6bbad2849fac9bb.png

    Here you can name your transfer and set up the speed of transfer:

    image.png.8be298eb00611d76113ffedd969f1813.png

    Then set up the actual transfer on the Device Tab

    image.png.3b96284995d4502537b2e2448152eb93.png

     

    And end up with something like this:

    image.png.6ad789fbb8429c3e529829d3a7158e74.png

     

    Now the GOT will automatically read the Sick inputs and send the status over to your Mitsubishi PLC.  You don't have to write any logic, just configure the transfers!

     

     

  15. One other thing to mention is to check your Firewall settings.   When you first install the software, the first time you run it, it asks for permissions and most people don't give full permissions.

    For each version if In-Sight Explorer it is a good idea to check off all the boxes under Domain, Private and Public in your WIndows Firewall (or other Firewall) program.

    image.png.fd2531221f6b6aa81d513031649da6e6.png

  16.  

    Well I don't know how this eluded me for the last few months, but starting with GX Works3 V1.070Y we now have BOOKMARKS!

    So what are they and how do I use them?

    We're all used to bookmarks in paper books and bookmarks in web browsers, this is no different.  To create a bookmark simply Right Click on a code element and select BookMark.

    image.png.5508ae0be7a2e7e6b904d7f79e74935e.png

    Once that is done you will have a new Bookmark docking window with your new bookmark in it.

    image.png.e6869db4b994b0f8de3558d0ab36d707.png

    The "ProgramBody:(R=21,C=11)" is you bookmark and it's in the Bookmark Docking window.  You can undock this and move it wherever you like.  You can even close it and then get it back by using View->Docking Window->Bookmark

    image.png.17a4637d2f45b253def50396a0390938.png

     

    Okay, but ProgramBody:(R=21,C=11) doesn't mean much to me.  So how do we make it usable?  Simply right click on it and select "Change Bookmark Name"

    image.png.52345d42aefba52ae0c6df038be65cf5.png

    If you have several sections of your code that you jump to on a regular basis, this allows you quick access

    image.png.9b83294a20a4828da0daa952e02041b9.png

    Enjoy!

     

  17. Mitsubishi makes it very easy to replace your older VFD/Inverter Drive when the time comes.  Whether it's a failed drive in the field, or preventive maintenance to replace a drive that is out of warranty and obsolete, or if you are building the next generation of equipment and want to use the current generation of drive, there are lots of reasons to need to update your inverter to a new series.

    My favorite tools for doing this are what Mitsubishi refers to as their Pocket Guides.

    Basically, when a new series comes out, Mitsubishi will make a Pocket Guide that shows the previous generation's model number and the cross to the new model.

    Here are some of the basics:
    1) You generally want to stay in the same family of drives, for instance FR-A500 or FR-A700's are replaced with FR-A800 VFDs
    2) The different series of drives are often rated differently in North America.  For instance the older A500 series are rated in Killowatts (kW) whereas the A700s are rated in output amperage at ND whereas the A800s are rated in output amperage at LD.  Therefore as an example the FR-A520-45K-NA drive (45kW) is replaced by the FR-A720-01750-NA drive (175.0Amps at 230V Normal Duty) and this in turn was replaced by the FR-A820-02330-E160 (233.0A at 230V Light Duty).  You'll see this in the chart below that the FR-A820-02330-E160 is rated at 175A ND.
    3) Mounting may not always be comparable, but usually newer drives can be smaller than their predecessors.  Always check installation dimensions when crossing inverters.
    4) Parameters are often, but not always transferable.  If you are using an inverter in a simple control scenario, most of the old parameter numbers are the same as the new parameters in newer drives.  However, do not assume this.  It's always good to get the upgrade guides and review them.
    5) If you are using any add-on cards, make sure a similar card is available on your chosen replacement drive.

    image.png.d5e942d4cde49f6b9e3dc1e1475f35b3.png

    Here are some resource links, you will need to have a login at https://us.mitsubishielectric.com/fa/en/ for these to work:

    FR-A Series Crossovers:

    FR-A800 Pocket Reference Guide

    FR-A500(L) to FR-A800 Transition Notes

    How To Procedure - A500 Series to A800 Replacement Information

    FR-F Series Crossovers:

    FR-F800 Pocket Reference Guide

    FR-E Series Crossovers:

    FR-E700 Pocket Reference Guide
    Note:  The E800 series is out but since the FR-E700 series is still current and the E800 line is still releasing new models, Mitsubishi hasn't released a pocket guide yet.

    There are also some older drives such as the FR-A02x series and FR-Z series

    FR-A024 and FR-A044 series cross to FR-E700 Series
    FR-A024/FR-A044 to FR-E700 Series Transition Guide

    The FR-A100 Series is replaced by the FR-F800 Series
    The FR-A200 Series is replaced by the FR-A800 Series
    The FR-S500 Series is replaced by the FR-D700 Series
    The FR-U100 Series is replaced by the FR-D700 Series
    The FR-V200/FR-V500 Series is replaced by the FR-A800 Series with FR-A8AP card
    The FR-Z020/Z024 Series is replaced by the FR-E700 Series (and soon FR-E800)
    The FR-Z200/Z300 Series is replaced by the FR-A800 Series 

    I hope collecting this into one place helps people who may be struggling to find the correct drive upgrade.

     

  18. A common question is how do I map the Modbus TCP registers into my PLC program from the Sick Flexi Soft Modbus Gateway?

    Using the FX3-GMOD gateway can be a little confusing because it can be handled multiple ways.  The default will look something like this:

    image.png.b851249fd7aa3bf0628e42c39dadb6be.png

    Upon first glance it would look like the Input Data Set 1 would be in Holding Registers starting at 400001.

    However, this is not the case.  When you look at the manual for the card you will find this:

    FlexiSoftModbusRegisters.jpg.9f450c02f7c85820608da15571b2add4.jpg

    So if the PLC is requesting the data and the FX3-GMOD gateway is acting as a server, the device addressing is very different.

    As you can see here you can look at registers 1000, 1100 etc as different blocks to read the data from the module and write data to the module. 

    The most common data set to read starts at 1100.  This is "Input Data Set 1".  And as an example you can see something like this in the GMOD configuration:

    image.thumb.png.229d54f22f17d5f093b52d53cab3b9b3.png

     

    Each module will have it's own set of bits listed out as well as the Logic Results at the top and the DirectOuts at the bottom.

    However you will see here that 50 bytes are shown (0 through 49).  If you look back at the chart where it describes "Input Data Set 1" starting at 1100 it shows reading 25 registers.  That's correct.  Each register is 16 bits, so Logic result 0 and Logic result 1 will be in the first Modbus Register - 1100.

    The Sick documentation states that the registers are 1 based.

    As an example I am reading with a debug program here:

    image.png.3a3d00f4065188f4de2ecd1cde656958.png

    I am using function code #3 for Modbus, I am reading 25 registers starting at 1100 with a minus offset of 1.  And you can see the results match the previous screenshot from sick where in 1102 I have a value of 3 which matches bytes 4&5 (4 being low, 5 being high byte) and bits 0 and 1 are on in byte #4.

    Make sure you read ALL 25 registers with your read as well.

    I hope this helps someone else get their Sick FX3-GMOD reading properly.

     

     

     

     

  19. For questions regarding product selection and availability, please reach out to insidesales@gibsonengineering.com or call us at the number below.

    • Address: 90 Broadway, Norwood, Massachusetts 02062
    • Phone: (781) 769-3600
    • Fax: (781) 769-8455
×
×
  • Create New...