Solved

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

Posted on 2004-08-28
6
142 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
Technology Partners: 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

752 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