Jump to content

Bryon Sol

Administrators
  • Posts

    142
  • Joined

  • Last visited

Everything posted by Bryon Sol

  1. If you are trying to reach the camera over a VPN, you most likely will not be able to discover the camera. The UDP discovery protocol is blocked by most VPNs. Instead, you will need to go to the System menu and add a camera through the Explorer Host Table. In order to do this, you need to know the IP address of the camera.
  2. 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.
  3. 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. 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 In In-Sight Explorer for Cognex you can see that there are various versions of MC Protocol Making sure you have the correct version selected will allow you to connect your HMI or other device to your iQ-F (FX5) PLC.
  4. As of late August of 2021 Mitsubishi Electric has released support of CC-Link IE Field Network Basic on the MR-J5-G and MR-JET-G series servo amplifiers. Why is this important? Well, for starters as long as you don't need coordinated motion, this reduces the cost of implementing a servo system significantly. All current Mitsubishi PLCs with built-in Ethernet ports support the CC-Link IE Field Basic protocol, that includes the L-series, Q-series, iQ-F (FX5) series and iQ-R series. This makes servo control available to everyone at a very cost-competitive price point! If you refer to the article written by Al Armin on August 7th of 2020 he explains where CC-Link IE Field Basic fits in for motion control. You can see that article here: The new MR-J5 series amplifiers are the top of the line servo drive from Mitsubishi Electric's Factory Automation group. They include advanced technologies like vibration suppression, failure prediction, absolute encoders and single-cable solutions between the amplifier and the motor. They are available in a variety of sizes from 100W up to 7kW with plans for 22kW to be released in the near future. And with 26-bit encoders on the servo motors, motion precision is unmatched in the industry. The new MR-JET series amplifiers on the other hand offer pricing that is almost on the level of stepper motors while providing 22 bit encoders for superior positioning accuracy. The motors also provide speeds up to 6000rpm and the ability to use absolute positioning via battery backup on the amplifiers. In sizes up to 3kW, this series of motors and amplifiers provides one of the most cost-effective motion options on the market. Not only can you control servo amplifiers over CC-Link IE Field Basic, you can also control VFDs, remote I/O and even talk to Mitsubishi Robots. And the best part is that should you need to upgrade your control from simple point-to-point or speed/torque controlled applications to full-blown multi-axis coordinated motion it's a breeze with Mitsubishi's Motion modules. Simply add an FX5-40SSC-G card to your iQ-F solution or an RD78G card to your iQ-R solution and you can mix and match MR-J5-G and MR-JET-G drives on the same CC-Link IE TSN network for the most demanding applications. And with advanced diagnostics built-in, you can be assured that your system will be easy to troubleshoot. Unsure where to start? Contact us and we'll be glad to help you specify the correct components for your next motion project.
  5. Intelligent Actuator (IAI) has a tool on their website for figuring out the correct cable between the actuator and controller. This was always a bit tedious in catalogs or otherwise. But with this tool in just a few clicks you can find the appropriate cable! https://www.intelligentactuator.com/iai-cables-search-tool/
  6. 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. Next we add a new Device Data Transfer from the Project tab Here you can name your transfer and set up the speed of transfer: Then set up the actual transfer on the Device Tab And end up with something like this: 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!
  7. Version 1.0.0

    57 downloads

    The attached PDF and example GX Works3 Project show how to set up your FX5U/FX5UC PLC via parameters to read and write to a Modbus/TCP Server without writing any code. This methodology does not work for the iQ-R or FX5UJ CPUs and their built-in Ethernet Port. For those CPUs please reference the Predefined Protocol function for setting up a Modbus/TCP Client. On the iQ-R platform if you purchase an RJ71EN71 network card, you can use the same methodology shown in this setup via the add-on Ethernet module.
  8. Not that long ago, Ethernet wasn’t common on PLCs and other industrial devices. Even 10 years ago you often had to buy a separate option card to add Ethernet to your PLC. But now it has become ubiquitous and with it has come a plethora of terminology and misunderstanding. I often hear customers ask, “does this PLC support Ethernet communications?” Unfortunately, the answer for most current PLCs is yes. Why is this an unfortunate answer? The problem is Ethernet is not a communications standard, and it is not even a hardware standard. So, what is Ethernet and what do I mean when I say that it is not a Protocol? Simply put Ethernet is a family of computer networking technologies (Wikipedia, 2020). This can be comprised of various hardware, firmware and software technologies working together to provide communications between devices. To explain Ethernet, let’s look at an analogy and use Telephones as our example. In the early days, we had simple devices and a switchboard operated by people. The main components haven’t changed much but the technology certainly has. We still have the receiver (the telephone), the wires and some type of switchboard. This is the hardware layer. On top of the hardware we now have firmware – our cordless phones in our house have firmware to talk to the base station for instance and the switchboard is something we don’t even worry about anymore. We just accept that the hardware and firmware do what we need it to do. Similarly, with Ethernet we have a hardware layer. This consists of the physical devices such as PLCs, HMIs, Robots, etc., cables and Ethernet switches. The technology has moved from a computer-based communications standard to communications for all sorts of things such as IIoT, Smart Home devices, and so much more. So, coming back to the original statement “Ethernet is not a Protocol”, what does that mean? It means that we still have not discussed the signals going over those wires and how they are formed and how the devices on each end of the line process them. Imagine for a second hearing your phone ring, picking it up and the person on the other end starts speaking a foreign language and you do not understand them. At a very high level you could consider that a PROTOCOL. They are using the same hardware as you, they are sending data and receiving data, but the two of you are not talking the same language so you can’t communicate with each other. In and Industrial environment, there are a lot of protocols that have been developed by different companies over the years, some of the most common are: Modbus/TCP – Developed by Modicon (now Schneider Electric) MC Protocol – Developed by Mitsubishi Electric PROFINET – Developed by Siemens EtherCAT – Developed by Beckhoff Automation Ethernet/IP – Developed by Rockwell Automation (Allen-Bradley) There are many more out there, and there are even variations within protocols by certain vendors depending on the hardware platform. For instance, most Rockwell PLCs can talk Ethernet/IP but some will only do a subset called Explicit messaging and will not perform Implicit messaging. Of course, this matters a lot, because while we may be able to physically connect all of the components on the same network, they may not be able to communicate with each other. So the next time you are trying to choose hardware for a project, the question you should be asking is not “what communications hardware” does this device have, which is what you are asking when you ask if a device has Ethernet. Instead ask “what protocols is this device capable of using” – or in other words, what languages does it talk. Once all of our devices are talking the same language, system deployment time and development time can be significantly reduced and you will know that you have a rock solid and stable platform.
  9. With Robotics expanding rapidly in the industry, the need for simple, easy to set up grippers for Robotic End of Arm Tooling is more important than ever. Intelligent Actuator makes some of the industries best electric actuators. With simple setup and unsurpassed quality, their RoboCylinder line of products has been an industry leader for decades. Now IAI has released a new ELECYLINDER Electric gripper. These 2 position actuators with built-in controllers replace air actuated cylinders and are set up with just 4 easy steps: They can be configured with the TB-03 teach pendant or IAI's new IA-OS software. They can even be configured wirelessly. These cost effective grippers come in 4 variations from 10mm and 28N of force up to 20mm and 360N of force. Best of all, they act just like a 5/2 valve with built-in sensors, with a simple Backward or Forward output and returning Backward and Forward signals, two digital inputs and two digital outputs control and monitor the gripper with ease. For more information and to get the catalog, visit IAI's website: https://www.intelligentactuator.com/ Or go Directly to the ELECYLINDER Gripper announcement here: https://www.intelligentactuator.com/elecylinder-gripper-type-catalog/?awt_a=AREc&awt_l=IBx9y&awt_m=3ary._bPZtxraEc
  10. 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.
  11. 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. Once that is done you will have a new Bookmark docking window with your new bookmark in it. 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 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" If you have several sections of your code that you jump to on a regular basis, this allows you quick access Enjoy!
  12. 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. 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.
  13. Did you know that Mitsubishi FR-A800, FR-E800 and FR-F800 series Variable Frequency Drives (VFDs) include built-in Programmable Logic Controller (PLC) functionality? That’s right, the VFDs/Inverters that you are used to using to drive your 3-phase motors have a built-in PLC that can be enabled to do logic control without an external device. Not only this, but you can add extra input and outputs via add-on cards to expand the functionality. Let’s look at a simple example – the E800 VFD This new inverter from Mitsubishi comes in two different styles, the classic serial connection and Ethernet connection. And both have a MELSEC 2K Step PLC included. This might allow you to reduce internal components and save panel space, eliminating wiring time, and reducing system setup times. Not only could you have a system comprised of a single VFD providing both functions of a PLC and Inverter, but you can use inverter-to-inverter communication. The inverter-to-inverter link function enables communication between multiple inverters connected by Ethernet in a small-scale system by using the I/O devices and special registers of the PLC function. You can also connect a GOT2000 series operator interface panel to the VFD to interact with the system and change various parameters in your PLC program. Using expansion modules you can add more inputs and outputs to your inverter including not only digital inputs and outputs but analog as well. And it provides all the familiar programming languages that PLC programs are used to using, including Function Block Diagram, Ladder and on the E800 Structured Text. All of this is done using Mitsubishi’s FR-Configurator 2 software and the FR Configurator 2 Developer programming environment. So the next time you have an application such as a conveyor application or pump application that requires more than just a motor drive you might consider the Mitsubishi family of inverters with built-in PLC.
  14. Version 1.0.0

    29 downloads

    The attached file demonstrates with code a quick start guide and code examples how to connect the Sick Flexi Compact CPUc2 with built-in Ethernet port to a Mitsubishi iQ-F PLC using predefined protocol support tool simply and easily.
  15. Possibly the easiest location is this website: https://www.mitsubishielectric.com/fa/download/cad/index.html You can get 2D and 3D CAD there for most of their PLCs, VFDs, Servo Products, HMIs, Robots, Breakers and more!
  16. Maybe you are new to Ethernet Networking or maybe you’ve been doing it for a while and you know how to get it to work but fumble most of the time before getting it right. Either way, this blog is intended to give a basic understanding of Ethernet networking. We won’t get into more advanced topics like VLANs and DMZ, and if you haven’t even heard those terms, that’s fine. This is meant as a beginners guide. So let’s get to it. Firstly, let’s talk about your address. No, I don’t mean your city and state or even your country. But instead your IP ADDRESS! IP is just the abbreviation for Internet Protocol. Your IP Address is where your PC lives on the network. It’s as simple as that. What’s more complicated is that there are different networks. For people new to networking, we think that everything these days is internet connected, but that’s just not true, and honestly we probably don’t want everything directly connected to the Internet, that would make things more vulnerable than they need to be. But for now let’s start with your company’s network and the internet so we can explain what happens on that type of network. Let’s pretend instead of your PC being a computer, let’s imagine that you are a student starting mid-semester at a new school. When you arrive at school on your first day, you wouldn’t just walk in and sit down at any desk. You are aware that people probably have assigned seats so you would ask the teacher where you could sit right? Well your PC does the same thing on a company network. When it arrives it asks for a “seat” from the teacher. In this case the seat is an IP address and the teacher is a device on the network called the DHCP Server. When you connect your PC to a network via WiFi or a company wired network, you are almost always using DHCP (Dynamic Host Control Protocol) to be provided an IP Address so that you don’t conflict with other computers on the network. Okay, great. So you have an address, you know where you are. But – do you know how to get a message to someone else? If they are in your classroom with you (to extend the metaphor), you don’t need any help getting them the message. You just talk to them directly. This is because they are part of your SUBNET. Because of what’s called the Subnet Mask, our PC can know who it can talk to without any help. We can communicate with all of the PCs and devices that are on our same Subnet. But if someone is outside of our subnet we need help passing the message along. The device which passes the message along is called the Gateway. A common IP address used on home networks and sometimes small networks will be something that looks like 192.168.0.X where X changes for each device. The typical subnet mask used along with this IP address is 255.255.255.0. To keep this simple, just understand that the 4 numbers of the IP address mate up with the 4 numbers in the subnet mask. So: - 192 mates with the first 255 - 168 mates with the second 255 - 0 mates with the third 255 - X mates with the 0 at the end And at the simplest level. If you see 255, this tells you that the numbers MUST match for communication to work without needing someone to help. So if both devices have a subnet of 255.255.255.0 then all 3 first numbers in their IP addresses must be the same or the two devices won’t talk to each other without someone helping. You can think of it kind of like this, an IP Address has four parts: Town.School.Classroom.Seat As far as Subnet mask is concerned, if the Subnet Mask says 255=the number must match, 0=doesn’t matter for communication. There’s a lot more to this, but we are trying to keep this simple. Therefore if we had subnet of 255.255.255.0 it indicates that Towns must match, Schools must match and Classroom must match. Then for example 192.168.0.100 can talk to 192.168.0.22. But 192.168.0.100 can’t talk to 192.168.1.22 because their third octet (classroom) doesn’t match. You can find a much more detailed description here of how this works if you’d like to read it. https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/tcpip-addressing-and-subnetting Great, so we are starting to understand the terms. IP address is our specific location, subnet mask is who we can talk to without help, and Gateway is the helper to talk to people outside our classroom. What about if we know someone’s name, but not their address? How do we talk to them? That’s where DNS servers come into play. Think of the DNS server like a phone book. If you know someone’s name you can look up their number. When you connect to a company network, typically the “Obtain an IP Address automatically” box is checked. Then the DHCP server will give you ALL of the information on this page. It will give you an IP Address, an appropriate subnet mask, the address of the Gateway and a couple of possible DNS servers to use, so when you want to get to http://www.gibsonengineering.com you can find out the address. And when you want to send information to Gibson Engineering, you will give that information to the Gateway device and it will pass it along for you. So overall things kind of look like this, where the Gateway is allowing the connection to the internet – in this picture imagine the cloud as the internet. Okay, so that takes care of the company network and getting internet access. But what about my industrial network? Well here’s the trick - we want to keep them separate! If my company network has 172.16.20.X addressing then we can use 192.168.0.X addressing. But if it uses 192.168.X.X already, then I want to pick something different. Why? Because we don’t want confusion. Remember my analogy of Town.School.Classroom.Seat? Well in the USA there are 88 towns named Washington. There are 399 instances of schools named Lincoln in the USA. Even if we have two separate network cards in the PC we are using, if the towns and schools are the same, how does the software I’m using know where to send the message? Having two network cards in a PC actually allows me to communicate on two separate networks simultaneously, but if they are both using the same addressing scheme then it still won’t work. However, subnetting will often allow things to be very close and not cause conflicts. For instance, my company network could be using 192.168.0.X addresses with a subnet of 255.255.255.0 but if I wanted to, I could set up all my PLCs and HMIs and barcode readers and cameras and other industrial devices on 192.168.1.X addresses and if my subnet for that card is 255.255.255.0 then there are no conflicts. This is why Mitsubishi choses to default to 192.168.3.X IP Addresses for their devices because they know that most likely this won’t interfere with most company networks by default. So in the end, I’m often setting up my computer to look something like this: To summarize, we usually have two separate networks in Industrial Automation. Our machine network and our company network. They must have two different numbering schemes to prevent conflicting addresses, and the IP addresses and subnet masks must match for things to be able to communicate. Quick checklist for troubleshooting connection problems: 1) Do you know the IP address of the device you want to talk to? i.e. 192.168.3.18 2) Is your IP address in the same range? i.e. 192.168.3.X anything other than 18 3) Do your subnet masks match? 4) Is your IP address unique? Is something trying to use the same address? If all of the above looks correct, it’s often a cabling problem or a conflict with some other software such as Firewalls or Antivirus software preventing the software from talking. As networks get more complicated and security becomes a bigger concern, there will always be things not covered by this article. But with a good general understanding of how networks work, you can usually solve most networking issues.
  17. Programmable controllers have come a long way in the past few years. And Mitsubishi's iQ-F line of PLCs is no exception - or maybe it is? PLC programmers are used to thinking about using large rack mount systems when they need a lot of processing power, and while that still remains true, the lower end has grown so much that applications we used to have to reach for larger and more expensive PLCs to accomplish can now be done in much lower cost units. For example Mitsubishi's FX5 (iQ-F) series PLCs. In the previous generation of hardware we had the FX3 series PLCs for small simple applications. And while we could do motion control on that platform, it was not as easy as on higher end platforms and the capability was limited. Then there was the top of the line iQ (Q series) platform. The Q series could do it all, and very well, but it could be costly. So Mitsubishi released the L series as an intermediary and it found a niche in the market where the Q series costs were a little too high but performance needed to be more than the FX3 could provide. It's hard to believe but the L-series was released over 10 years ago. But would you believe me if I said that the FX5U has very similar processing power? The FX5U is now an established product. It's been on the market for 5 years and can be used to replace both the predecessor FX3U series PLCs and all but the most demanding L series applications. With options like Ethernet/IP communications, 8 axis of coordinated servo motion on a single card, and even the latest and greatest CC-Link IE TSN technology for high speed deterministic cutting edge Ethernet based control and communications. This little PLC punches well above its weight. If you are looking to refresh your projects, it could be well worth the effort to look at the FX5 series. Typically speaking all FX3U series PLCs can be replaced with the equivalent FX5U. A lot of L-series projects can also be replaced by the FX5U. And recently Mitsubishi released the little brother to the FX5U, the FX5UJ. This new offering matches the IO count of the previous FX3G series PLCs coming with 24 or 40 I/O. It has slightly less memory than the FX5U/FX5UC PLCs, but is also a cost reduction while being a huge step up in processing power and ability from the previous generation FX3G. Currently as of March 2021 there are three main variants in the iQ-F series: 1. The FX5U - comes with screw terminals and various sizes starting at 32 I/O 2. The FX5UC - the compact version with either ribbon cable connection or spring terminal connection for very tight space constraint applications - both the FX5U and the FX5UC are comparable in memory, processing speed an most other capabilities 3. The FX5UJ - lower IO count than the FX5U, smaller memory All models include Ethernet as standard, SD Card for data logging and other functions, and all come in a very compact form factor. If you haven't looked at the FX5 family. You may be missing something great. Maybe this PLC IS the exception because it disrupts everything you thought you knew about compact PLC performance at a competitive price.
  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: 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: 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: 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: 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. Almost every week I support someone using Modbus communications in one form or another. And when I say one form or another, I truly mean that. Modbus is not a single protocol but a family of protocols. There’s Modbus ASCII, Modbus RTU, and Modbus TCP and maybe even more, but those are the ones I am most familiar with. I cannot say that I am a guru on Modbus, but I can certainly attest to dozens, if not hundreds of hours setting up and using this protocol. Mostly I have used it in two forms, Modbus RTU and Modbus TCP. For the rest of this article, I am going to be pulling information from https://modbus.org/ for the technical details. This is a great resource and I highly recommend visiting that page, especially https://modbus.org/specs.php. The original Modbus standard as I understand it was developed by Modicon in 1979. It is a typical client/server communication protocol much like most other industrial protocols, however this protocol has become an Open protocol, meaning that it is free to use and therefore has been widely adopted by many companies. Obviously, back in 1979, the Internet as we know it today did not exist and so the original Modbus specification worked over an RS-485 multi-drop serial network with one client and many server stations on a network. In this version, each client needed a station number. All clients needed to talk synchronously, so they had to share a common baud rate (bus speed) and agree on all the various details to avoid collisions on the network. As Ethernet hardware developed and it became a predominant communication network for PCs, it worked its way into Industrial hardware and Factory Automation as well. With this change of hardware, Modbus TCP was developed to take advantage of a network that was becoming increasingly popular and readily available so that custom wiring and hardware solutions would no longer be required. Since Modbus TCP rides on top of the TCP/IP stack, it can co-exist with other Ethernet traffic quite nicely and rarely bogs down a network. These days we are getting more and more accustomed to seemingly instantaneous data, available exactly when we want it, and when we need it. But not all data needs to be provided that quickly, and Modbus, plain and simply put, is not a fast protocol. It is a polled protocol whereby the Client will request data cyclically, often this is in the range of 100ms to 500ms. This is not unlike many other protocols, but it certainly is more apparent with Modbus. So, when using Modbus communications in your application, be aware that the polling rate is not terrifically fast. Furthermore, if you need deterministic feedback from sensors or devices, Modbus is probably not the preferred network; whether it is RS-485 or Ethernet, it does not really change. So, what can you do with Modbus and why would I continue to use a 40+ year old communication protocol? Simply put – because it works! The protocol really has not changed significantly since I started using it in April of 2000. It is a stable, while sometimes frustrating to set up, protocol that once configured seems to be rock solid and stable. I believe that comes down to the fact that most people only implement the basics. For Modbus, this consists of reading and writing two types of data: bits and registers. The most common commands that I see used are the following: Read Coils – Modbus Command 01 (Hexadecimal 0x01) Read Discrete Inputs – Modbus Command 02 (Hexadecimal 0x02) Read Holding Registers – Modbus Command 03 (Hexadecimal 0x03) Read Input Registers – Modbus Command 04 (Hexadecimal 0x04) Write Single Coil – Modbus Command 05 (Hexadecimal 0x05) Write Single Register – Modbus Command 06 (Hexadecimal 0x06) Write Multiple Coils – Modbus Command 15 (Hexadecimal 0x0F) Write Multiple Registers – Modbus Command 16 (Hexadecimal 0x10) Basically, when a Client sends a request to a Server, it is sending one of these commands, the command is followed by the details such as the coil/register number and how many devices. If we are sending any data, that is obviously included in the packet as well. There are more commands than this and not every manufacturer implements every command code, so you need to read through their documentation to see which command codes they have implemented and any restrictions that may exist. For instance, when reading and writing multiple coils or registers, there is often a maximum number of registers that can be read or written at a time. This all is easy so far - Client, Server, Address (station number or IP), command codes… no problem, but this is when it can get tricky. Not everyone seems to agree on how coil and register numbers work. From https://en.wikipedia.org/wiki/Modbus we find the following table: The issue becomes that not everyone starts their address space at 1, some people start at 0. So, sometimes you will ask for register or bit number 1 and get bit number 2. There was even an older standard that only used 4 digits for address, so 4,001 not 40,001 was the first holding register. So, whenever I first set up Modbus communications, I will do a test. I will first get Holding Registers reading and writing and I often just ask for a single register and I choose 40,001. Why? Because if you are zero based (so you start at 40,000 instead of 40,001) you should still have this register and if you are 1 based then it would be the first register and not the second. I will then fill in values on both sides and see if I get back the data I expect. Then, I make a note of any offsets and I know that it will work from here on out for this setup. The last couple of things to understand about Modbus is that there is no concept of strings, or floating-point values. These are data types that consume multiple consecutive 16-bit registers. So simply map your data into multiple consecutive registers and decode it on each side of the transfer. Which leads us to the final tip – decoding the data. Unfortunately, just like register addressing and 0 vs 1 start, not everyone agrees on the order of bytes within a register. Some manufacturers prefer high-byte order and some prefer low-byte order. If you get a value but the bytes seem reversed from what you expect, check the communications setup. Often there is a checkbox or a switch for inverting byte order. If not, you may have to do this manually. Hopefully, this article can help you get started with Modbus. It has been around for a long time and will continue to be used because it simply works, but unfortunately it doesn’t always work simply!
  20. 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
  21. Often with new In-Sight Vision Systems or Vision Sensors, or ones that have been on the shop floor for a while, you find that you can't connect to the system. You may forget what the IP Address is of the camera, or if it's new it comes set to DHCP and you can't get connected. The steps below will help you get connected. We recommend in order to simplify the setup, use hard-wired Ethernet from your PC to a simple Ethernet Switch and nothing else. The reason for this is to make sure that we don't have any address conflicts and that simple communications can work. Do not use a router, or a managed switch, just a simple unmanaged switch. Typically we could also go directly from the PC to the camera without the switch, but some older PCs do not have auto-crossover hardware whereas most switches these days do allow for this. Step 1: Connect your PC and camera to a stand alone network switch, use the wired network port of your PC. Step 2: Set a Static IP Address for the PC's Ethernet Port This depends greatly on your operating system how you get to the list of network adapters. But in the end we typically want to get to "Network Connections" In most Windows operating systems once you get to Control Panel, go to Network and Sharing Center, then "Change adapter Settings", you should see a screen something like this with your various network adapters. Right Click on Ethernet (or whatever your wired network adapter is) and select Properties. Next select the IPV4 line and click Properties again. Set the IP address to a static address. Most companies will use 192.168.0.X or 192.168.1.X for their company network, some will use the 172.16.X.X range and some will use the 10.X.X.X range. We just want to pick something that does not conflict with your company network. Often a 192.168.3.X address will work, so for our example we will use 192.168.3.100 So your settings will look like this: After you click OK, you will now have a static IP Address on your PC. Step 3: Open In-Sight Explorer Step 4: Click on Get Connected Step 5: If you see the camera in the list, you can select it and click Connect, but most likely it will not be there, so you will need to click Add Step 6: Decide if you want to change the Camera's IP Address or your PC, and set the appropriate device's IP Address. The Camera will show up in the list, if you select it you will see it's IP Address. If the camera is part of a working machine, you want to change your PC's IP address to be in the same range as the camera, so go back to Step 2. If the camera is new or not part of a working machine, then it's okay to change it's address as shown below. Step 7: Go back to Get Connected and select the camera and connect!
  22. One thing to be aware of is that the FX5UJ series does not allow SFC. The FX5U and FX5UC PLCs do, but the FX5UJ does not.
  23. As yet another example of the amazing flexibility and power that Mitsubishi’s iQ-F Controller, Mitsubishi has now added Sequential Function Chart programming to the FX5U and FX5UC compact, cost effective PLCs. If you have been a PLC programmer for a long time you have probably programmed in ladder logic, and most likely Function Block Diagram languages (FBD) which has also been called Structured Ladder programming. You might have even used Structured text (ST) programming. But have you ever tried SFC? If you have a project where the machine acts very sequentially, SFC can’t be beat for making troubleshooting the sequence easier and faster. Let’s explore all of the available languages in the FX5U and FX5UC PLCs. The first is Ladder programming and it is the classic language for PLC programming which comes from classic relay logic. Ladder Logic is very easy to read for standard input and output logic if all you need are inputs, outputs, timers and counters. Once you go beyond simple logic, Ladder programming can start to look and feel kind of clunky. As you can see below, once we start trying to add Function Blocks into ladder, the classic clean look and feel starts to get broken up. The simple Set/Reset block really feels out of place. That’s where Function Block Diagram (FBD) programming starts to show it’s power. It is much cleaner and easier to read when we start using larger function blocks. It also lends itself well to Object Oriented Programming techniques. We also have Structured Text programming available to us. For those who have done extensive PC programming, a text based language may feel much more comfortable, but for PLC programmers there are still significant advantages to this language. For performing complex math or string manipulation, Structured Text (ST) language makes for a very clean, compact, easy to read language. So with having 3 languages already, why would we need or want a fourth? First, let’s examine what SFC programming is. The name gives it away: Sequential Function Chart. SFC is represented as a flow chart format with Blocks, Actions, and Decisions (transitions). An SFC program starts at an initial step, executes the next step every time the relevant transition becomes TRUE, and ends a series of operations at an end step. 1. When starting a block, the initial step (1) is activated first and then the action (2) is executed. After execution of the action (2), the program checks whether the next transition (3) has become TRUE. 2. The program executes only the action (2) until the transition (3) becomes TRUE. When the transition (3) becomes TRUE, the program ends the action (2), deactivates the initial step (1), and activates the next normal step (4). 3. After execution of the action of the normal step (4), the program checks whether the next transition has become TRUE. If the next transition does not become TRUE, the program repeats the execution of the action of the normal step (4). 4. When the transition becomes TRUE, the program ends the action, deactivates the step (4), and activates the next step (5). 5. Every time the transition becomes TRUE, the program activates the next step and ends the block when it finally activates the end step (6). So where would I use SFC and why? If you’ve ever written ladder and used STL (Step Ladder) instructions or if you’ve ever written your own State Machine logic, then you’ve basically written SFC programs without knowing it. However, SFC has some advantages over STL and State Machine Logic in plain ladder. With SFC, only the ACTIVE block is scanned. This means that the CPU can scan much faster and is much more efficient. Not only is your scan time reduced (often by very significant amounts), when monitoring SFC, you can see which step or steps are active very quickly and easily and jump right to a very small section of code to see what is going on. In previous generations of PLCs, the logic inside SFC had to be written in Ladder programming. Now with the iQ-R and iQ-F PLCs, the code resides in an Action. Each Step can have up to 4 Actions tied to it, and each Action can be written in any of the standard three languages. With the latest release of GX Works3 Programming software (Version 1.070Y) we now have SFC available to us on the FX5U and FX5UC series PLCs. If you have a PLC with serial number 1.7X or later, you can update the firmware to version 1.220 and take advantage of this powerful language. I hope this brief introduction into SFC has piqued your interest. Now go write some code!
  24. Color Inspection comes to the ViDi Platform Cognex has announced the release of Color cameras for use with its ViDi Deep Learning platform. If you haven't been keeping up with Deep Learning in Machine Vision, this is huge news. Not very long ago Deep Learning and neural networks were limited to lab use or very large complex systems. But now you can train complex applications and deploy them on Smart Cameras on your product line to perform inspections that were never possible with traditional rules based machine vision. Read the blog here at Cognex "5 Inspections Made Possible with Color Imaging and Deep Learning" By utilizing the D900 platform, Cognex is bringing Deep Learning out onto the production floor in unprecedented ways. Whether it's Kitting, Defect Detection, OCR or other difficult inspection tasks, Cognex has a system that can tackle your toughest applications. Benefits of the D900 ViDi System: 2.3MP and 5MP Grayscale or Color Cameras with HDR+ IP67 Rated Housing for Ruggedness in the Industrial Environment Performs inspections not possible with traditional Rule Based machine vision No PC on your production floor Familiar In-Sight Spreadsheet programming environment Ease of Deployment
×
×
  • Create New...