Variable Resolution Index


Bardownski

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

Archived

This topic is now archived and is closed to further replies.