Sign in to follow this  
Bardownski

Variable Resolution Index

Recommended Posts

Hi everybody,

   

Is there a way to assign a resolution index to a variable? For example:

 

      using("device.LabJack.")

      include("c:\program files\labjack\drivers\labjackud.h")

      AddRequest(0,LJ_ioPUT_CONFIG, LJ_chAIN_RESOLUTION,11,0,0)

      GoOne(0)

       x = “something”   // this assigns resolution index (11) to x

 

Best regards!

 

Dacfactory version Base 5.87a (Labjack U6-pro)

Share this post


Link to post
Share on other sites

Yup, basically what you did, but you need to declare X too.  You probably want something like:

    global resolutionIndex = 11

     using("device.LabJack.")

      include("c:\program files\labjack\drivers\labjackud.h")

      AddRequest(0,LJ_ioPUT_CONFIG, LJ_chAIN_RESOLUTION, resolutionIndex ,0,0)

      GoOne(0)

Share this post


Link to post
Share on other sites

Ok, Perfect!

Sometimes all it takes is a simple question and answer to make things *click*! I knew you could declare a variable and use it to assign the resolution, I have done it many times. In this case I was so focused on the declaring variable based on the resolution, I spaced the simple solution.

Thank you very much!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this