Variable Resolution Index


Bardownski
 Share

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)

Link to comment
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)

Link to comment
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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share