Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-08-28
6
Medium Priority
?
144 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
Independent Software Vendors: 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 2000 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

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!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

721 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