proc getFrequency {rig vfo} { global VFO_B set vfo "A" if {$vfo == $VFO_B} { set vfo "B" } sendCommand $rig "?$vfo" set hexFreq [readResult $rig] puts [string length $hexFreq] #binary scan $hexFreq @1I freq #return $freq # Debugging binary scan $hexFreq c* data foreach byte $data { puts [expr {$byte & 0xff}] } return "0" } getFrequency $rig $VFO_A Output is: 5 65 0 165 111 24