The tcl script that I'm running is below. It always returns datareadyflag = -1 even though it should stay in the loop until there is data to collect.
#declare variables set outStr "*IDN?" set dataReadyFlag 1 set tclDataReceived "noData" #/---------------------------------------------------- #open a connection set tclsocket1 [socket "192.168.1.72" 3000] fconfigure $tclsocket1 -blocking 0 -translation binary #/---------------------------------------------------- #send a command puts $tclsocket1 $outStr flush $tclsocket1 after 100 #/---------------------------------------------------- #get a response while {dataReadyFlag>=0} { set $dataReadyFlag [gets $tclsocket1 tclDataReceived] puts "tclDataReceived $tclDataReceived" } #output to console puts "dataReadyFlag $dataReadyFlag" puts "done" -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users