Agilent Technologies E3633A Operating Manual page 140

Hide thumbs Also See for E3633A:
Table of Contents

Advertisement

Chapter 6 Application Programs
Example Program for Excel 97
T o w r i t e a n E x c e l m a c r o y o u m u s t f i r s t o p e n a m o d u l e i n E x c e l . G o t o t h e
m e n u , c h o o s e
d i a l o g b o x a p p e a r s . S e l e c t t h e
A 1 a n d d r a g a c r o s s t h e c e l l B 3 . T h e "
c h a n g e t h e b u t t o n n a m e , c l i c k t h e r i g h t m o u s e b u t t o n o n t h a t b u t t o n a n d t h e n
s e l e c t P r o p e r t i e s . T h e
c h a n g e t h e " ( n a m e ) " a n d " c a p t i o n " t o " D i o d e " . T o t r y t h e e x a m p l e f o r
c h a r a c t e r i z i n g a d i o d e , t y p e " V o l t a g e s " i n c e l l A 4 a n d " C u r r e n t " i n c e l l B 4 . I n
c e l l A 5 t y p e 0 . 6 . F i l l i n t h e c e l l s A 5 t o A 1 5 i n 0 . 0 2 i n c r e m e n t s s o t h a t c e l l A 1 5
c o n t a i n s 0 . 8 .
T o e n t e r t h e " D i o d e " m a c r o e x a m p l e i n t h i s s e c t i o n , g o t o t h e
c h o o s e
a p p e a r s . T h e n t y p e t h e t e x t a s s h o w n o n p a g e 1 3 9 i n t o t h e "
w i n d o w . T o e n t e r t h e d e c l a r a t i o n f o r W i n d o w s
c h o o s e
s t a r t i n g o n p a g e 1 4 1 . T h i s m o d u l e w i l l c o n f i g u r e a l l o f t h e o v e r h e a d r e q u i r e d
t o c o m m u n i c a t e w i t h t h e p o w e r s u p p l y o v e r t h e i n t e r f a c e . C h o o s e t h e
p r e f e r r e d i n t e r f a c e b y s e t t i n g " b G P I B = " t o " T r u e " o r " F a l s e " a n d c h a n g e t h e
G P I B a d d r e s s o r R S - 2 3 2 p o r t i n t h e r o u t i n e " O p e n P o r t ( ) ' ' c o n t a i n e d i n t h e
m o d u l e .
T o r u n t h e m a c r o , r e t u r n b a c k t o t h e
b u t t o n i n t h e d i a l o g b o x a n d c h o o s e t h e m a c r o n a m e , a n d t h e n c l i c k o n t h e
R u n
t h r o u g h t h e v o l t a g e s i n t h e w o r k s h e e t . A f t e r e a c h s t e p t h e c u r r e n t i s m e a s u r e d ,
a n d r e c o r d e d i n t h e w o r k s h e e t .
M a k e a n y c h a n g e s n e c e s s a r y t o s u i t y o u r a p p l i c a t i o n i n t h e " D i o d e ' ' m o d u l e .
Y o u m u s t e n t e r t h e i n f o r m a t i o n i n t h e m o d u l e s e x a c t l y a s s h o w n o r e r r o r w i l l
b e g e n e r a t e d . I f s e v e r a l s y s t e m e r r o r s o c c u r w h i l e a t t e m p t i n g t o r u n a m a c r o ,
y o u m a y h a v e t o r e b o o t y o u r P C t o g e t t h e G P I B p o r t o r R S - 2 3 2 p o r t t o w o r k
p r o p e r l y .
To use the example with Window ® 3.1, you will need to modify the declarations at
N o t e
the top of the module. Change 'visa32.dll' to 'visa.dll' in all declarations.
128
T o o l b a r s
, a n d t h e n s e l e c t
P r o p e r t i e s
T o o l b a r s
V i s u a l B a s i c E d i t o r
, a n d t h e n
M o d u l e
M o d u l e w i n d o w
. T h e "
b u t t o n . T h e p o w e r s u p p l y w i l l r e s e t t o p o w e r o n c o n d i t i o n a n d t h e n s t e p
C o n t r o l T o o l b o x
. T h e
C o m m a n d b u t t o n
i n t h e d i a l o g b o x . C l i c k c e l l
C o m m a n d B u t t o n 1
d i a l o g b o x a p p e a r s . I n t h e
i c o n . T h e "
®
9 5 / N T , g o t o t h e
" a p p e a r s . T h e n t y p e t h e t e x t a s s h o w n
E x c e l
w i n d o w a n d s e l e c t t h e
V i e w
C o n t r o l T o o l b o x
" b o x i s c r e a t e d . T o
P r o p e r t i e s
d i a l o g ,
V i e w
m e n u ,
C o d e w i n d o w
"
[ M o u d l e 1 ( c o d e ) ]
"
I n s e r t
m e n u ,
R u n M a c r o

Advertisement

Table of Contents
loading

This manual is also suitable for:

E3634a

Table of Contents