Posted 10 Feb 2020 Hey all, I am having some issues with a Keyence IV2 camera which has Ethernet/IP functionality. To summarize briefly, it has been configured and reading the data into my PLC (NJ501) into a structure data type. The issue I'm having is that I cannot control this on a bit level for triggering the camera, etc. I was reading that a Union type is the way to go, but unfortunately, I stopped getting data into the PLC when setting it up that way. According to the configuration guide for Rockwell and setting it up in the Network Configurator, I needed to go with the SINT type. When registering the device, the 8-bit option was necessary since the Input/Output sizes needed to match. This was predetermined by the EDS file for the IV2. I am stumped as to how to get the data to read into the Union Type, and any suggestions would be greatly appreciated. Thanks, -K Share this post Link to post Share on other sites
Posted 10 Feb 2020 I am trying to help, but Keyence's website won't let me download the IV2 Field Network Manual. I would suggest using a Structure. You can build a structure that is the exact size you need and you can define some of the data as bits and others as Reals, UINTs, etc. If I could get a look at their manual, I could build a structure for you in a library for you to use. 1 person likes this Share this post Link to post Share on other sites
Posted 10 Feb 2020 Thanks @Michael Walsh. I'm going to look into this tomorrow, but I'm attaching it here. Still relatively new to Omron (been working with it since July '19) so I definitely appreciate it. -K AS_106197_IV2_UM_869GB_GB_WW_2010-2.pdf Share this post Link to post Share on other sites
Posted 11 Feb 2020 (edited) Structure is definitely the way to go. Attached is a copy/paste from a working program we have. Keyence IV Stuctures.csv Edited 11 Feb 2020 by IO_Rack 2 people like this Share this post Link to post Share on other sites
Posted 11 Feb 2020 Thank you @IO_Rack! This is very helpful. Looking at the .csv, specifically the byte/bit offsets for END_BYTE, what determines that value (I'm guessing that's documented somewhere with Keyence)? My end goal would be to look at a specific tool in the program rather than the overall judgement to give us more capability in recipe-based production. Thanks, -K Share this post Link to post Share on other sites
Posted 11 Feb 2020 Here is the complete assembly in library form. Keyence IV2.slr To use this file, go to the Project pull down menu, choose Library -> Show References. Then press the + button. Choose the attached library file. The Data Types would then be added to your program. Then you can create variables as shown below: I have also attached the library source file so that you can see / modify it as you would like: Keyence IV2.smc2 If you modify the library, you will need to go to Project pull down, then Library, then Create Library after you have made the changes. You can then use the newly created .slr library file in your project. 2 people like this Share this post Link to post Share on other sites
Posted 11 Feb 2020 @Michael Walsh Fantastic...thank you very much. This is a side of Omron I have not looked into yet. I recently updated my Sysmac Studio so I'm not sure if yours is different. I ended up copying and pasting the Data Types into my program from the library reference popup (clicking OK didn't add them automatically). I definitely need to look into how to create a library file because we have quite a bit of hardware coming in that this will be useful for. Thanks all for your help, -K Share this post Link to post Share on other sites
Posted 11 Feb 2020 K, It may appear that the data types did not show up when you add the library. You need to create global variables and type the data type in like this keyence\UDTKeyenceInputAssembly (it will autofill when you start typing Keyence and again after you enter the \) just as I showed in the picture a couple of posts up. I created a Namespace called Keyence and that is why this method of entry is necessary. After you add the library, you should be able to see that the two structures were added in the Keyence Namespace (Project -> Library -> Show References and then expanding the Data option): Then when you add a new variable, you should see the type ahead work like this: Share this post Link to post Share on other sites
Posted 11 Feb 2020 Copying and pasting the data types into your project is completely acceptable and will not cause you any issues, I just was trying to fill in the blanks about how to use UDTs when loaded from a library file. Share this post Link to post Share on other sites
Posted 13 Dec 2021 On 2/10/2020 at 10:40 AM, kdobsontn said: Hey all, I am having some issues with a Keyence IV2 camera which has Ethernet/IP functionality. To summarize briefly, it has been configured and reading the data into my PLC (NJ501) into a structure data type. The issue I'm having is that I cannot control this on a bit level for triggering the camera, etc. I was reading that a Union type is the way to go, but unfortunately, I stopped getting data into the PLC when setting it up that way. According to the configuration guide for Rockwell and setting it up in the Network Configurator, I needed to go with the SINT type. When registering the device, the 8-bit option was necessary since the Input/Output sizes needed to match. This was predetermined by the EDS file for the IV2. I am stumped as to how to get the data to read into the Union Type, and any suggestions would be greatly appreciated. Thanks, -K Hey I've been reading this post and I'm kinda having the same problem... but here my question is where did you get the EDS? on the keyence web I only found the EDS for IV series (not IV2) is it the same? Could you please help me? Share this post Link to post Share on other sites
Posted 13 Dec 2021 It can be found in the folder where IV2-Navigtor is installed. Share this post Link to post Share on other sites