Solved

Hi wondering how to submit data to base addresses, Visual Basic

Posted on 2004-08-28
6
140 Views
Last Modified: 2010-05-02
This is from the manual of the AR-B2102B Relay ISA device which i need to control, (Copied from http://www.acrosser.com/products/ar-b2102b.htm)
Could someone give me an example of how to do this Using Visual Basic code
And does this card need any installation other than simply plugging it in and controlling it through VB... ?
--------------------------------------------------------------------------------
 
¡@The AR-B2102B occupies 4 consecutive addresses in the PC. I/o address space of which only two addresses are actually used. The base or starting address is selected during the installation procedure. The two registers of the AR-B2102B are located as follows : Base +0 Relay output 1 & Base +1 Relay output port2
¡@Note that all ports are 8 bit (one byte) wide and require byte oriented write operations rather than word operations. Writing a low (0) to a relay within a port de-activates the relay. Writing a high (1) to a relay activates it. When the output is energized, the status LED indicator will light up to indicate an active input.  
 
 
Programming :  

--------------------------------------------------------------------------------
 
¡@No driver is necessary for the AR-B2102B since the program is very simple and can be accomplished most efficiently using direct I/O instructions in whatever application language is used (Basic, C, Assembly, Pascal, etc.). For example, assume you wish to turn on relay channel 7. Also assume the AR-B2102B board has been set to base address 992(3E0 hex). To turn on relay channel 7, you simply need to write a 10000000 to base address 992. Likewise to turn on channel 9, 11 and 13 on the same board simply write a 42 decimal (00101010 binary or 2A hex) to I/O address 993.
¡@The following example is in Basic but can easily be translated to other languages : Example : Assume the board is installed at base address 992(3E0 hex). To turn on the channel 1 and 10 :
xxx00 Base=&h3E0 Base I/O address
xxx10 OutBASE,2 TURN ON CH1
xxx20 OutBASE+1,4 TURN CH 10
0
Comment
Question by:mSchmidt
  • 4
  • 2
6 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 11922034
I think the code should read:

xxx00 Base = &h3E0 'Base I/O address
xxx10 Out Base, 2 'TURN ON CH1
xxx20 Out Base + 1, 4 'TURN CH 10

There is no direct way of outputting directly to I/O ports in VB.

This site has an OCX which claims to be able to do it.

http://www.uct.on.ca/
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 11922152
By the way, the page that you indicate -  http://www.acrosser.com/products/ar-b2102b.htm - does mention a Windows 95 driver disk in the Ordering Information table
0
 

Author Comment

by:mSchmidt
ID: 11929020
true, i have this disk
does it help me ?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 76

Expert Comment

by:GrahamSkan
ID: 11929783
I don't know. It's just evidence that a driver is needed for windows. I think if you are running Windows 95, 98 or Me then it should work.
The i/o is completely different in NT, 2000, & XP. The OCX that I indicated that claoms to work for these versions
0
 

Author Comment

by:mSchmidt
ID: 11940011
The one you pointed to though costs money, isnt there any free choices which could help me accomplish this ?
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 11941169
That's the only one I could find, I'm afraid. A good producer should have up-to-date drivers. Perhaps you could put an otherwise obsolete DOS or Win95 computer on your network.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question