Jump to content
OMRON Forums


  • Posts

  • Joined

  • Last visited


  • Website


  • Cookies Consent

JoergVogel's Achievements


Newbie (1/14)

  • One Month Later
  • Conversation Starter
  • Week One Done

Recent Badges



  1. A custom camera device is a script, that anyone can add by New menu option into the Explorer tree in ACE. There is a hint to import an image file. Our goal was to acquire images from cheaper camera devices, that are capable to work 24/7. Surveillance Cameras are a solution for this condition. Most of them can transfer images to an FTP Server. And the Custom Device in ACE can read those image files. Because of the huge amount of file transfers the storage capacity ends after some month. Maybe the hardware can be damaged too by many writing jobs. You can get around this by using a software ramdisk program and a routine to delete older files instantly. I attach our script file which reads any newest image of a ramdisk directory for a demonstration. Please feel free to comment or answer any suggestions of improvement. EDIT main source code: using System.io; string[] Picfiles = Directory.GetFiles(@"O:\", "B*.bmp", SearchOption.AllDirectories);// drive letter “O”, //get an array of paths of bitmap files string picFile = Picfiles[Picfiles.Length-1]; // last completely transferred file if (Picfiles.Length < 1) { picFile = @"C:\Daten\08-Labor\default.bmp";} // default image, if nothing is transferred int bitsPerPixel = IsColor ? 32 : 8; // default custom code int lLength = ImageSize.Width * ImageSize.Height * (bitsPerPixel / 8); // default custom code return CSharpDevice.ConvertImageFile(picFile, IsColor == false);// hint custom code Thanks! Regards Joerg. CSharp_Camera Custom Device Read Picture Files from RamDisk.txt
  2. We were told that a new camera won’t work with an outdated and no more supported system. We get a new camera working. First our new camera works as a custom device. We put a C Sharp (C#) pylon dll library by copy into \bin directory of ace program directory. This library comes from a Pylon Viewer Suite 6 out of Development directory. We added a Custom Device from Vision into Explorer tree. It is a C# script calling GrabImage method within. GrabImage is capable to return an 8bit pixel size grayscale or a 32bit pixel size color bitmap. Our camera default output file image data is Bayer RG8, which has got 24bit pixel size. We begin our project by watching Basler webinars for Pylon Development suite for Python integration and C++. We get to know that there are libraries for .Net or C#, C++ and C. And most interesting there are program examples for those languages. “Grab” is a simple program to acquire images from first camera device in Pylon Viewer and it shows in a MS Windows window the grabbed image. We copied some of the source code into the C# script GrabImage section and returned a buffer variable. Variable “buffer” contains byte array data. A pixel size of 8bit is applied by a file image setup of Mono8 Pylon Viewer Camera property setting. But we were not able to set a 32bit file image format directly in our camera. First we enhanced variable “buffer” after every 3rd byte with another byte to get a 32bit pixel size. Later we found a convert method to do the same in the namespace of basler.pylon. Certainly there are still some errors in the source code, because we aren’t educated programmers nor doing a lot of coding on a level of deploying source code. But we are gladly that we can still use a bought camera in an outdated system configuration for our Roboter. This custom camera device can we connect to a virtual camera device to do image recognition within Sight of ACE. We are interested in any hints developing our approach further on. Thanks for reading and any suggestions. Regards Joerg CS_ACE_Custom_Vision_Device_BaslerPylon-Camera-converting.txt
  • Create New...