instron Posted April 5, 2009 Share Posted April 5, 2009 I am a new LabJack user, and so far very enthused about what the UE9 is capable of doing compared with other vendors' products. My application uses one analog input to monitor the output of a signal-conditioning amplifier, and 20 of the digital I/O to monitor the outputs of a 20-bit binary counter, which counts pulses from a quadrature incremental encoder. The reasons why it's being done this way are beyond the scope of this post, but my problem is that I need to convert the raw inputs coming into the UE9 into two scaled and weighted parameters that can be used for Variable Display objects, Graphing traces, and most importantly, logging outputs. Firstly, the analog signal I'm measuring is +10V for zero-scale and 0V for full-scale, so the voltage coming into the UE9's analog input (via an LJTick Divider) needs to be multiplied by a scaling factor, and the result subtracted from 10 to get a true scale value. I can achieve what I want in the Display objects and graphs by using conversion formulae in the appropriate places, but I could not find any really simple way of getting that converted value outputted to a logging set. I posted this question on the LabJack forum and have received a working solution, i.e. use Conversions - if anyone has a better suggestion, I'd like to hear it, particularly if it works in with one for the larger problem, next. The 20 digital I/O is even tougher. Each digital bit has an appropriate binary weighting applied to it so that when I add them all up I get a decimal equivalent to the binary count. I then apply a scaling factor to that result to get a true relationship between the number of pulses going into my (external) binary counter and the angular displacement of the encoder shaft. Again, I can get conversions for Display Variables and Graphs, which are 10 lines long, but need to get that converted decimal number into the logging set as just one parameter. The obvious answer to this is to use scripting, but the other users of the machine to which my UE9 will become grafted want the flexibility to create .ctl files of their own making, and whilst they are all scientifically savvy, most of them don't know anything about programming let alone C or C++ syntax. I'm hoping that I've missed something in the moderate amount of reading I've done of the Application Guides, and that someone can advise me as to a direction, or illustrate using a previous solution to a similar problem. Thanks to all who contribute here, Instron Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.