Solved

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

Posted on 2004-08-28
6
138 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

912 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now