Sign in to follow this  
Followers 0
Guest ion

VB for CPM2B

5 posts in this topic

I need to monitor the changes of a group of register value (DM100 - DM160) using VB. The update time should be less than 100ms. I'm using Omron CPM2B. I am a newbie in VB. Anybody can help me to provide the VB script for my problem, pls?

Share this post


Link to post
Share on other sites
Here is a nice VB application that can be modified to start anybody's first Hostlink VB program. It includes the source code. Hostlink VB Demo Program @ MrPLC.com

Share this post


Link to post
Share on other sites
Jay, the hostlink sample application work fine. Thanks to the advice. But, I still have a little problem.... If I try to send command "RD01000032", (means request to read data from DM0100 to DM0132), the response box shows some strange data. It seems like an un-complete data. But the problem will dissapear if I reduce the data length to 30 ("RD01000030"). Why this could be happen? Anybody could help me on this so I can read more than 32 words of data in a single command? Thanks...

Share this post


Link to post
Share on other sites
The Hostlink Protocol is limited to 128 byte frame. This comes out to 30 registers (4 bytes per register.) If you ask for more than 30 registers, then the Hostlink will send a multi-frame response with no terminator (*). Send a carriage return (CR) and it will send you the next frame. You can recognize the last frame when you see the terminator(*) on the last response. BTW, where did you get a CPM2B?

Share this post


Link to post
Share on other sites
IC.... So, I still have to make another data request polling interval. :-8 Anyway, I bought this CPM2B from a local Omron distributor in Indonesia for about US$125,00. Low cost version of CPM...

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