william Posted April 2, 2017 Share Posted April 2, 2017 I cannot get "getlength" to prin to the Command/Alert window I tried using device.XBEE.purge() private string datain private data private length private thetime while (1) try datain = device.XBEE.readUntil(asc('x')) //read serial sentence ? datain //display datain sentence in command/alert window thetime = systime() if (left(datain,5) == "$PUMP") //valid data stream length = getlength(datain) ? length data = parse(datain,1,",") ? data data.time = systime() PU_bar_p.addValue(data) But the "? length" does not display anything in the Command/Alert window. Attached is complete sequence. Help appreciated. Thanks Bill PUMP.txt Link to comment Share on other sites More sharing options...
AzeoTech Posted April 3, 2017 Share Posted April 3, 2017 Are you sure the if() is evaluating to true? I like to add stuff to my ? lines when I think it might have an empty value. So instead of doing: ? length I might do: ? "Length: " + length That way I know it must print something or its not going through my if(). If length is empty, it will generate an error, not just print a blank line. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.