Beckhoff BK8100 programing in Visual Basic 6.0

ujrai

Member
Join Date
Jun 2009
Location
Manchester
Posts
11

Hi All,
I have been handed over Beckhoff BK8100 Bus Coupler with Serial Interface along with its peripheral Terminals like 8 Channel Digital I/O (KL2408, KL1408), 2 Channel Analog Output (KL4012), 2 channel Analog Input (KL3062) and Pulse Train Output Module (KL2521).
All this suff is totally new for me. Although I have good experience in Allaen Bradley and Festo PLCs and Visual Basic. Can I get same support for programming of Beckhoff BK8100 and Digital I/O Terminals in Visual Basic 6.0 (Enterprise Edition) with some examples in VB.

Do I need to get Beckhoff KS8000 software or any other OCX module for programing in VB. I would be very grateful.
 
What I need to do is to operate 8 channel Relay Card using a Graphical Interface in Visual Basic 6.0
I am using BK8100 that supports Serial Interface RS232. Block Diagram would be like this
PC(GUI in VB)----->(Serial Interface)----->Beckhoff BK8100---->Beckhoff 8 Channel Digital Output Terminal(KL2408)---->8 Channel relay Card.

Can any one help.......Thanks
 
To program a Beckhoff controller, you will need Beckhoff TwinCAT software. You can download it from their web site.

Although it says "30-day demo", don't worry - it is fully functional. "Demo" applies only to run-time license (i.e. if you want to create a program to run on your PC) and each BC controller has its own run-time. You should also download "Beckhoff Information System" which contains all the hep files.

Be aware that you are looking at substantial amount of learning and work and that the help files from Beckhoff sometimes are not really... well, helpful (pun intended). As far as programming goes, TwinCAT is, in essence, CoDeSys 2.0 - if you are familiar with it (I am not sure but it seems to me that Festo is using it as well), everything will be much easier for you, if not - well, it is very powerful thing but is quite different from any Allen-Bradley stuff.

Writing an HMI front-end using VB is certainly possible and there are two ways to go about it. First is to use Beckhoff TwinCAT ADS library (not sure if it installs when you download TwinCAT demo or if you need to download it as a separate file). It contains whatever is needed to let a Windows app (VB, C, .NET etc.) to communicate with a Beckhoff controller. The library is free.

Another way is to use an OPC server. The latest release of Kepware's KEPServer contains a driver for Beckhoff ADS communications. Check out KEPWare's web site, you can download their product with VB samples and documentation for free and run it for 2 hours before it needs to be restarted. This way the intricacies of ADS communications have been taken care of for you by Kepware and your VB program would be able to address each variable inside the BC controller by name.

Good luck. It might be a good idea if you contact the nearest Beckhoff vendor/tech support to give you a quick kick-start.
 
Thanks LadderLogic. I have downloaded the 30 days demo of TwinCAT from Beckhoff website and also "Beckhoff Information System" file as well. But it seems to be Pain in the .... as u mentioned. The examples are not really specific what I require. I would try to get Beckhoff TwinCAT ADS library as the demo software doesn't install that.
"Beckhoff KS8xxx ActiveX Control 2.0" would this be of some help... Thanks
 
"Beckhoff KS8xxx ActiveX Control 2.0" would this be of some help... Thanks

No. You will see a whole bunch of these in registered VB project references list, but these are components that Beckhoff software uses for module configuration; there is nothing you can do with these.

Beckhoff actually offers you several different ways to implement ADS communications: there is a fully-fuctional DLL, a smaller VBScript DLL, and OCX and .NET assembly, whichever one you want to use (you obviously cannot use .NET with VB6).
If you are to use the OCX component, you should have AdsOcx.ocx in your SYSTEM32 folder. Another simple way to go about it is to use, as an alternative, a VBScript ADS library; it is normally found in \TwinCAT folder as TcScript.dll.
 
ujrai,

Do you actually have a IPC running twincat? or do you just have the BK8100 header and I/O? In other words are you trying to communicate to the I/O via serial?

I have used both Twincat and have a VB6 program that communicates to it. If you let me know what it is you wanty to do I maybe able to help
 
Hi

You need a Beckhoff product called KS8000 - this is a product designed to do exactly what you want. To quote from the help file:

ÜbersichtOverview

The "Beckhoff KS8000 Communication Library" provides functions with which it is easily possible to communicate with Beckhoff BK8x00 Bus Couplers via a serial PC interface.


Specification

KS8000 permits access to the input and output process image of the BK8xxx Bus Coupler via the serial PC interface. Through each serial PC interface it is possible to establish communication with a BK8100 coupler (RS 232) or up to 99 BK8000 couplers (RS 485). Such communication transfers the whole of the input and output process image. The duration of the communication therefore depends on the size of the process image, or in other words on the number and type of terminals attached.
(Measurement: RS232 coupler, 38400 baud, process image 1 word results in about 6 ms. With 15 words, the result is about 20 ms).
It is also possible to alter the coupler's watchdog time.

You can download it from:

ftp://ftp.beckhoff.com/Software/TwinCAT/Supplement/KS8000/

but you will probably need a license to unpack it - cantact your local Beckhoff rep. (Not sure why it cannot be found on the Beckhoff website, though! :unsure:)

Regards

Roger
 

Similar Topics

Hello All, I am trying to program Beckhoff BK8100 in Visual Basic 6.0but its just getting on my nerves. I have to program KL2408 (8 x Digital...
Replies
2
Views
3,146
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
1,000
Hello sameone have Beckhoff PLC Siemens Sinamics V90 configuration example?
Replies
0
Views
98
hello, I am using Beckhoff with TwinCAT3 and when I change or add some new hardware or for any reason, there is a mismatch in the real hardware vs...
Replies
1
Views
126
I have a Beckhoff CX7000 IPC with some digital I/O built-in and I additionally need two analog inputs 0-10V. Can I install both Ethernet terminals...
Replies
4
Views
207
Back
Top Bottom