Help learning to write scripts

PLCRookie

Member
Join Date
Dec 2005
Location
I'm right here...
Posts
305
Greetings to all.
I just recently finished a project that involved visual inspection of o-rings presence and location on a revolving part, and I needed to use a few scripts to write some values to a Banner camera from a Proface HMI. I managed to get it done with a little head scratching, but it just got me realize that I am woefully lacking in the script writing area.
Just wondering if any of you gurus out there could recommend some good books on the subject. Its not really a pressing issue for me, but I am always looking for good reading, and I actually prefer to read technical manuals and such (I guess that makes me a real geek). I am mostly self taught on ladder, but I would really like to gain some knowledge on other languages.

Any comments greatly appreciated.
🍻
 
Most all 'scripting' tends to follow roughly the same principles and usually fall somewhere between plain old sequential logic to object oriented models based on events, methods and properties. Most times, it's somewhere in between. The main difference between scripting from one platform to another is mostly syntax and structure. Once you learn the idiosyncrocies of the 'language' you can usually muddle through.

I might suggest you pick up a good book on Visual Basic programming. Alot of platforms use VB or VBA (Visual Basic for Applications, a subset). It's a relatively easy language to learn (easier than jumping into C++), is object oriented (although some will argue not a true Object language) and is used in enough places that it will give you some real practical experience.
 
Kind of off topic. Have you used the Banner driver for the ProFace? The last several job I have used I added the driver and I cleaned up a lot of the ModBus TCP addressing. What kind of scripts are you using?
I like using the logic in my screen because the the camera has a limited processor.
 
I used the modbus TCP driver to communicated between the HMI and the camera. I wanted to be able to display the "total inspections" number for each part (as the part is turning, I triggered the camera continuously). I could read the data, but it was cumulative, and I needed to reset it after each part. I ended up just writing a "0" to the address of the inspections number at the start of each inspection. It actually works really well. I agree that the Banner cameras are somewhat "clunky" to work with (I prefer the Cognex), but this was built from parts laying around, so I had to use what was there. Finally got in touch with a really knowledgeable guy (rep)who helped me out with some of the issues.
 
I can’t comment on the "clunkiness” if that is even a word. When we where making our choice of cameras we looked at several different companies and at that time Banner was the only one that could talk to PLC5, SLC, MLX over Ethernet. Now most of them do so it is not an issue any more.

Banner has some good tech guys in Plymouth, MN. They are broken up in levels low ,medium , high, and then the upper you never get to talk to unless you are buying large quantities of special firmware. My local rep knows camera but not any of the communication stuff.

Glad you got everything up and running. You may want to look at the Banner driver for GP-Pro EX if you ever do another camera job. I have it on Version 2.1 2.5 and 2.5 (beta). It makes thing a little easier when you start addressing you don’t have to have the Ethernet/IP and Modbus/TCP Users with have every time you want to look at something in the camera.
 
Invent away. My wife works with a lady that just makes up works to fit the situation. If you call her out on making up a word she says “yea I did you can use it tomorrow if you want”

My counter part uses the word “Permitize” to mean permanently install something.
 
On a similar note, I had an issue with the Cognex cameras communicating to a ControlLogix over ethernet. Over time, when changing job numbers in the cameras via the PLC, we experienced "data leakage" (I like those words also). Basically the communication would time out, and disable the machine. The problem was with the ethernet driver in the ControlLogix. Apparently AB now has an ethernet driver specifically for the Cognex cameras.

Just an FYI, if anyone has had the same issue.
 
You may want to look at the Banner driver for GP-Pro EX if you ever do another camera job. I have it on Version 2.1 2.5 and 2.5 (beta). It makes thing a little easier when you start addressing you don’t have to have the Ethernet/IP and Modbus/TCP Users with have every time you want to look at something in the camera.

Jeff,
Did you get this from Banner or from Proface? I would like to check it out for future reference.
Thanks.
🍻
 
From ProFace call the tech support line or go to technical support website. It does require you to register but I have yet to get junk email from them will advertisements.
If you use the website go to profaceamerica then otasukePro (technical website) they have all kinds of info there.


Here is a quick link to the technical support drivers update page.
I included the above just incase you wanted to cruise their info.

Driver's update page

Hope this helps.
 
Thanks for the link Jeff.
Does this driver give me access to the "focus" data? I thought it would be a good idea to be able to view the focus data, as I don't have a PC connected to this machine, and I have had issues with the focus getting out of adjustment, and not being able to dial it back in without my PC.

Again, thanks for the info.

🍻
 
Last edited:

Similar Topics

Hello all! At my current job, we use Omron PLCs. This has been the only PLC brand I have professionally worked with. I need to move to another...
Replies
1
Views
1,773
I have been currently trying to learn how to use RSlogix 5000 and create ladder logics. However, it is giving me some trouble and it seems like a...
Replies
3
Views
2,118
I am a newbie in the field of PLC and we came in my company with a project in mobile harbour cranes But I don't have any experience in this cranes...
Replies
4
Views
2,248
I am currently attending school for PLC programming. I have set up a test station with a ML1200 and a GE micro 90. I am trying to learn both AB...
Replies
4
Views
5,107
Hi all. I know the answer to the title is probably that there is no definitive "right" way to program. But there probably is many definite...
Replies
14
Views
4,497
Back
Top Bottom