How to access Beckhoff KL6001 RS232 terminal from Step7

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
Has anybody ever used the Beckhoff KL6001 serial interface terminal block? I need to use one (in conjunction with a BK3120 bus coupler) to access a new Cognex camera and the documentation I've got doesn't include a PLC sample program - come to that, it doesn't have any sort of sample program, just a somewhat terse description of all the registers.

If anybody's ever used one of these, I'd be eternally grateful for a snippet of sample code. Access is from a 315-2 DP via Profibus.

So far I haven't been able to definitely identify which version of the KL6001 I've been given (the documentation mentions 3-, 4-, 5-, and 6-Byte versions) but after loading the 4-Byte version in HW-Config and downloading it to the CPU, the BK3120 came up without any red LED's on, so it looks as though that much may be OK.

Thanks in advance (hopefully!)

Roy
 
Roy,

There is a slim possibility that I might be able to help you out a little here..

We currently use a BK3100 bus coupler and a KL5001 serial interface card with our S5 PLC's, I am expecting these to be 'earlier' versions of what you are trying to use. Our KL5001 is hooked up to a serial output absolute linear encoder. The one we use is a 6 byte version, we read the three PIW's into the PLC, swap the bytes round and do what ever we need to do with the result. If it would help I could PM you with the code from the S5 function block that deals with this.

Paul
 
Hi Paul,

I'm sure it would be worth a look. At the moment I've got a copy of a WAGO program (from the German PLC site) for their equivalent kit, but I'm having a job trying to find out which WAGO devices are the equivalents of my Beckhoff ones.

Another problem I'm having is trying to identify which version of the KL6001 I've got. Although, as I mentioned above, the 4-Byte version appears to work, in as much as there are no red LEDs on either the Beckhoff BK3120 or the 315 CPU. However, both the Send and Receive LEDs are permanently lit on the KL6001 - even with the cable disconnected! - which doesn't seem quite right. Also they don't flicker when the camera should be sending data (we checked the camera using a PC, so we know it's sending data) and the data in the KL6001 input address never changes from zero.

If you can PM me the program, I can have a look tomorrow and see if it helps.

Cheers

Roy
 
Roy

PM is on it's way, I did think that I would have to wait until I got to work tommorow, but being the sad person that I am, I had a copy of the program on my laptop.

Paul
 
Thanks Paul,

I've copied the PM onto my USB stick and I'll have a look at it over the next couple of hours. I'll get back afterwards if there are any follow-up questions.

Cheers

Roy
 
Paul,

Just for once I could almost have wished I was using S5! The older version seems much simpler, although the data-Byte shuffling is still necessary with the KL6001 (just reflects the different Byte/Word relation between Beckhoff and Siemens).

After a lot of playing around with a VAT, I think I've finally sussed out what's going on and come to the conclusion that the programs I've found so far were unnecessarily complicated (presumably to cover all possibilities), so I think I'll grow my own version to do precisely what I need and not a bit more.

Thanks for the help,

Cheers

Roy
 
RMA said:
Just for once I could almost have wished I was using S5! The older version seems much simpler,

No!!! Don't go down that road, it might seem simpler, but it won't be in the long run. I hate S5, unfortunately I don't get much choice in that, I have to use it.

I hope the FB I sent you went a little way to helping you understand what was going on, especially the byte swapping part

Paul
 

Similar Topics

We are facing one issue in our TwinCat 2.10 system running on Beckhoff IPC C6140 with operating system Win2000 suddenly our machine got off or...
Replies
1
Views
5,878
Hi Siemens guys! I am experiencing SF fault on our S7-300 (6ES7 315-2AH14-0AB0) CPU from time to time. I've checked the diagnostic buffer and...
Replies
13
Views
169
Can we use a Simotion D455 ethernet port x127 as a gate, to access S7-1500 plc Tia Portal program ? In the Simatic manager, we used Netpro to do...
Replies
2
Views
85
I have to provide remote access and control to a touch screen. I was thinking about using Weintek and the Weincloud. Does anyone know if this is...
Replies
11
Views
595
Greetings, I am working on a project and I would like to scale %AI to -10.0 to 10.0 VDC. The module Input data is stored as a 16 bit Integer and...
Replies
4
Views
71
Back
Top Bottom