×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

What does this mean..?

What does this mean..?

What does this mean..?

(OP)
I am in excel learning to use VBA so that I can simply try to get a marker value from an Agilent network analyser. I have one of their .xls examples and it does all kinds of things to the analyser, but I can't seem to figure out how to modify the darn thing!  

THe analyser is on the network, and my computer is also on the network. The excel example file uses VBA that uses SICL-LAN (Agilent), that uses GPIB calls.

I am sure this is not too hard for somebody... it's just that my head is too hard... haha.

VBA issue:
What does the (1,1600) stuff do?
  Dim Data_y(1, 1600) As Double
  Dim Data_x(1600) As Double

SICL-LAN issue:
What is the diff between an iread and an ivscanf?
When would you use a scan instead of a read?

SICL-LAN issue:
What does the ", 6, 1, 0&)" part do?
 Call iwrite(id, ":CALC1:MARKER1:Y?" + Chr$(10), 6, 1, 0&)

RE: What does this mean..?

Hi groundhog1,

VBA issue:

Dim Data_y(1,1600) As Double defines Data_y as a two dimensional array of double precision numbers.

Dim Data_x(1600) As Double defines Data_x as a one dimensional array of double precision numbers.

I'm afraid I guessing about the iread, and ivscanf functions other than they are functions SICL-LAN has defined.

HTH
Todd

RE: What does this mean..?

(OP)
Yes thanks.
I am starting to figure this out a bit. The SICL part is the worst. Seems complex. But i am getting data from the network analyser now. So that is not so much an emergency now.

I am into the Basic programming stage at this point and now realize that i am not such a good programmer. My instinct is to just throw down a thousand lines of code in a row, with lots of messy variables and stuff...  I am quickly building a birdsnest of a program. I need to learn how to do this right. Learning about making general purpose modules that I can call repeatedly...ohwell..

I have another VBA question though..
When creating modules or subroutines in VBA, sometimes they are added to the main program and sometimes they are in their own module window. What is the difference and why would you create another module window for some code?

Thanks,
groundhog

RE: What does this mean..?

Quote:

When creating modules or subroutines in VBA, sometimes they are added to the main program and sometimes they are in their own module window.
Not exactly sure what you mean.  If you are creating subroutines, they will be placed in whatever module you select.  If you mean macro recorder code, these are typically added to a new module, even if one already exists.  Event procedures, on the other hand, are created in the appropriate built-in class module (e.g.  Workbook_Open in the ThisWorkbook class module)

Quote:

What is the difference and why would you create another module window for some code?
As for standard code modules, where you would typically write most of your procedures, there is no difference.  The main purpose is to group related procedures, data structures, etc. together as an aid to the programmer in development, maitenance and updating.  The compiler doesn't care.

Regards,
Mike

RE: What does this mean..?

The main benefit of using modules for sets of related functions and/or subroutines is so that they can be used easily in other programs (code re-use). I have one module used in many programs to do string handling, another to do odd math handling and yet another that opens and closes data connections and recordsets

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

Steam Engine enthusiasts: www.essexsteam.co.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources