Hi all! I am getting a T7 ready for a project and it has the need of reading many analog inputs, so we are using the Mux80 board and some CB37s to read them in, but I cannot seem to figure out the method for reading the specific addresses through Lua (as this will later be flashed to the board to run stand-alone). I have been reading the docs for connections between the MB.R(AIN#,3) and the actual AIN# address for the terminal blocks on each X# connection on the Mux80/CB37, but will continue to investigate this (just figured if someone knows already and could help, that would be great). I know in the Mux80 Datasheet describes using the MIO states, but not sure how to use these in Lua. For example: What is the command to read the address for AIN12 on a CB37 connected to the X2 on the Mux80 board with Lua? Thanks, if you can help.
There are a few key points:
1. X2 is extra quirky. From the "CB37 to Mux80 ..." chart near the top here:
datasheets/accessories/mux80
https://labjack.com/support/
... you can gather the following:
CB37-X2 Terminals => Channel #
AIN0-AIN3 => AIN0-AIN3
AIN4-AIN11 => AIN120-AIN127
AIN12-AIN13 => Not Connected
So the CB37-X2-AIN12 terminal is nothing. If we look at CB37-X2-AIN11, however, that is MUX127 (aka AIN127).
2. From the Modbus register tables on that same page, you can see that the starting address is 2x the AIN number. That is because each AIN uses 2x 16-bit registers to transfer a 32-bit float. So for example, AIN127 starts at Modbus address 254. Read that using MB.R(254,3).
3. You don't have to control the MIO lines. When you read those extended channel registers the T7 automatically drives the MIO as needed to select the proper channel.