You can download the example program written in Visual Basic 6.0 from the following link:
MsCommSample.zip
Sample includes detailed explanations as comment lines, so I am not going to explaing details of coding in this post.
To test the software you need to have a null modem cable if you want to communicate two computers.
You can make your own cable by soldering pins of two female DB9 connectors as follows.
Connector 1 Connector 2
Pin 2 <---------------------> Pin 3
Pin 3 <---------------------> Pin 2
Pin 5 <---------------------> Pin 5
If you just want to test how data is sent and received on your computer, you just need one connector; short circuit pin 2 and pin 3:
Connector 1
Pin 2 <--
|
Pin 3 <--
Make the cables at your own risk, short circuiting any pins other than 2 and 3 may damage serial port of your computer.
By default, software opens the Com1 port in 9600 bauds, no parity, 8 data bits and one stop bit without handshaking protocol. You can change it in source codes.
You also need to have Visual Basic 6.0 software to edit, debug and recompile program.
How to Code for RS232 in Visual Basic? Part 3 – Example
INDAFINS - OMRON Fins OCX
--------------------------------------------------------
05.12.2009 21:05
INDAFINS sources are uploaded to
http://groups.google.com/group/indanotes/web/OCX.zip
I was planning to publish all source codes by releasing beta version. (INDAFINS is still alpha version).
Unfortunately I don't have too much time to upgrade it. So I have decied to publish source codes of alpha version.
And also I was planning to upgrade INDAFINS as INDAFINS.Net for .Net environment after adding several more functionalities:
- Serial port support
- Read / Write I/O and timers, etc.
Please feel free to modify it,but I have several petitions:
- Please do not remove any links and information about indanotes.blogspot.com and this post.
- Please keep existing comments.
- Please add your name to source code as a comment if you modify it, and send to me to publish new versions here. I promise, I will keep your name also in this historical post.
--------------------------------------------------------
26.11.2008 00:35
I have released the documentation. I also realized that bad naming on source codes and fixed them.
You can download them from
http://code.google.com/p/indafins/downloads/list
--------------------------------------------------------
19.11.2008 13:32
Google rocks! I decided to host the project at google code instead of sourceforge.
You can download the setup files from
http://code.google.com/p/indafins/downloads/list
Setup file contains the ActiveX and a tester. I am going to publish the source codes soon.
---------------------------------------------------------
18.11.2008
An ActiveX controller 'INDAFINS' for OMRON FINS protocol is going to be published.
This posts address will be a permanent link, I am planning to edit this post on each version release.
It is still in alpha version and supporting only read & write data memories and extended memory banks over ethernet UDP.
I am planning to cover at least %90 of FINS protocol. Also I am planning to give FINS over RS 232 in the same ActiveX, so it should be very easy to change an applications communication method just only chancing one single line in a project.
Unfortunately, there is no documentation yet, I am planning to write a draft document as soon as possible.
However, when you are using this ActiveX, please:
- Use it by your own risk, it is not a commertial product. Just a freeware.
- Never place an emergency stop function on your PC applications, PC devices and communications are not stable, you may not stop the system in case of emergency.
- New warnings about INDAFINS can be added to this blog, it would be better to subscribe to RSS feed of this blog to be get informed.
I was planing to publish this ActiveX controller as an open source project in www.sourceforge.net, however I need to study more on CVS to publish on SourceForge.
I am going to find a reliable download host other than rapidshare, I would be glad if someone can offer me a good link.