Solved

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

Posted on 2004-08-28
6
143 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month3 days, 21 hours left to enroll

630 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