VB6 <> Omron SYSMAC C200HS via RS232C

bootsektor

Member
Join Date
May 2003
Posts
2
I am trying to figure out how to read and write the DM registers.

I have an OCX that was written by a third-party contractor long ago, but I am looking at porting the application to .NET, and would love to learn how to do this.

What I need is the following:

1. How to read a DM Register.

2. How to write back.

3. How to detect if it is running/there/anything.

I would be grateful for any information on how to do this.
 
Be patient. It downloads a manual into Acrobat reader. File is megabytes in size.
:oops:
 
It is fairly easy to read and write data from Omron PLCs using the Host Link protocol and the Omron users manual for your PLC should have a Host Link Communications chapter that will provide you with BASIC code to handle the communications. If I remember correctly, you basically begin by building a text string that begins with the @ followed by an action code, such as RD, for Read Data then the node address. Then you add in your target registers and data if you are writing to DM registers. The last part is a little tricky because the processor expects a FCS, frame checksum, at the end of the transmission string, but the Omron manual also contains the code for the calculation. Once you have sent the data to the PLC, you should get a response string back. Read this data in from the port and store it in a string variable, then parse the return data from the string. Sounds easy, but speaking from experience, their can be handshaking issues that arise. I suggest if at all possible you try to use an ActiveX control or an OPC server to handle the communications.

Hope this helps.
 
Last edited:
anyone have any idea how fast the serial rs232c interface can transmit data - our laptops seem to take an age to transfer the 512k is it? of software onto the wright industries wittigs we are using here in seagate

i thought perhaps a usb to serial might @ 500kbps be a little faster than the onboard 115 kbps of the usual serial interfaces supplied with laptops

but think the omron sysmac c200hs can only handle 19.2kbps is this correct? isn't there a usb interface that can be removed and inserted b4 and after software transfer?
 

Similar Topics

Does anyone have vb6 winsock code to connect with omron (cj1m PLC)through FINS ethernet.Any help appreciated
Replies
0
Views
2,364
I would like to share data between an Omron PLC (CJ1M) and VB6 by using a winsock VB (6.0) through ethernet. Does any one have sample code i could...
Replies
0
Views
5,507
hai, i want to know how plc work with vb6.
Replies
1
Views
2,624
Hello, I'm trying to solve a problem. The visualisation is done by VB6. How can i figure out wich databit in S7 is linked to wich variable in VB...
Replies
1
Views
1,543
im doing some coding in vb6 and i have an error in this line : Dim myOPCServer As New RSiOPCAuto.OPCServer it gives me this error when compling...
Replies
11
Views
2,316
Back
Top Bottom