Sign in to follow this  
Followers 0
Guest Uvaraj

Posibility TO communicate still faster with KV16Dt

4 posts in this topic

We have developed a PC based marking machine which does marking on metal surface. Here Custom built software in VB commands a KV16DT Keyence PLC which in turn is used control a x y table. We have two stepper motors for x and y directions. The PLC Commands this Motor Driver for its movements. For Eg if you want to draw "A" the marking pen is moved around with this x y table to mark letter "A". We have developed a VB software which will deside the co-ordinates for each alphabet and numbers and send this information to PLC. As it goes the deisgn is such a way that the PLC finishes set of 18 movements through value send by PC and ask PC to send next set of movements. The Machine works with this form of handshake. Here we are facing terible problem in the speed of communication. Keyence manual says that Keyence PLC can be connected with PC with 9600 Baud rate only. But the speed is increased till 115200 when we try to connect KV builder first and then our Vb software second. BUt when we connect to the PLC directly for the first time with our Vb software we could not go beyond 9600 Baud rate. How is that KV Ladder Buider can communicate at better speed but any other software custom built using mscomm32.ocx can not communicate with this PLC with better speed. Are we using the wrong control in our VB software. Or is thier any other active x control available to increase the speed better. Some one pls help ****************** regards Uvaraj

Share this post


Link to post
Share on other sites
I am not familiar with this PLC but I'll bite anyway since there are no other takers... First of all I'm not sure how you can reach 115200 with VB if all you use is mscomm32.ocx? mscomm32.ocx is not able to use speeds above 19200bps (at least not that I know). Second, how MUCH data you have to transfer? Are you transfering each point (PLC is just dumb follower) or you let PLC to do the interpolation? Stepper motors are not exactly race cars, even if you send data for each point using only 9600bps and SHORT messages (only target points), that should be fast enough. About connection: I am surprised that PLC will accept higher speeds and use them to talk to 3rd party devices but it does not have settings for it. This is very strange. It is not rare that PLC will default to certain speed and negotiate different connection speed if partner dictates it. In this case you would need to know how to write a PC program that would unlock faster baud rates. You can try to contact Keyence tech support or read manuals but you could try few things on your own. Did you try to monitor and log communication PC<>PLC when KV builder starts? Can you record the communication and simply play it back using VB program? This is most basic approach of ANY communication. Edited by panic mode

Share this post


Link to post
Share on other sites
The way you can change the speed of communication between your PC and PLC is the following: 1) Set the break signal to PLC (basicly setting pin 2 (DS) high in 100ms or more) The purpose is to set the PLC to default speed 9600. If the PLC is already set to 9600 there is no need for the breaksignal. 2) Open connection to PLC with the usual 9600, 8 data bits, 1 stop bit and even parity 3) Send 05H to PLC (ENQ) 4) Answer from PLC 06H (ACK) 5) Send 01 00 FF 02 53 05 A7 to PLC (all in HEX). The code 05 A7 is telling PLC to switch to 57600 speed. 01 AB = 9600 02 AA = 19200 04 A8 = 38400 05 A7 = 57600 06 A6 = 115200 (maybe not supported by all PLC´s) 6) Answer from PLC 06H (ACK) 7) Close connection. Now the PLC is ready to communicate with speed 57600 8) Open connection again to PLC with the new speed 57600, 8 data bits, 1 stop bit and even parity 9) Send CR to PLC 10) Answer from PLC CC, and now you can start your usual data transmission This should be all Good luck Martin

Share this post


Link to post
Share on other sites
I need to run the stepper motor using KEYENCE PLC Model : KV -24R or KV -40R. I have three stepper motor drives and motors. I have to run the motor using pulse and Dir signals. ANYONE PLEASE HELP ME TO GENERATE LADDER PROGRAM FOR DRIVING STEPPER MOTOR USING THE KEYENCE KV-24R OR KEYENCE KV-40R PLC. REGARDS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0