smaier Posted April 26, 2017 Share Posted April 26, 2017 Hello. I have a test platform that consists of 3 serial devices; a servo, a force gauge and a travel indicator all of which I've communicated with using WinWedge in the past. What I'm having a problem with is the code used to strip off the unwanted parts of a string sent from the force gauge and the travel indicator so under Channels the chart and table can use the leftover numbers. With the rs232 monitor window open, communication with the force gauge looks like: Tx: ?\013 Rx: 0.014 lbF\013\010 I'd like to get rid of the " lbF" so I tried the following: private string dataout = "?" + DoubleToStr(Channel) + Chr(13) private string datain = Poll(dataout,13) return(StrToDouble(Left(datain,5))) When I create a new channel and look at the table data, the value is reported as "NaN" (or something very similar, I'm not at the machine at the moment). I am having the same issue with the travel indicator but the code is very slightly different. The reported value in the channel table is the same, though. I'm sure it's something embarrassingly simple I'm overlooking, but any help would be greatly appreciated. Thank you! Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.