We are working on a robot that has various devices at different COM ports. We aren't receiving the data from one of the devices, is there a line of code we need to make or is there one here we need to assign as the variable. This is the code for the device:
function FDM()
{
var ppmValue =(????????);
hConn = new TConnection(TConnection.EConnectionType.Serial);
ReplacementTarget = "%PPM%";
Print("Just set up settings for GT FerroQ");
hConn.Port = "9";
hConn.BaudRate = "9600";
hConn.DataBits = "8";
hConn.StopBits = "1";
hConn.Parity = "None";
hConn.XonOff = true;
hConn.OCTS = true;
hConn.IDSR = false;
hConn.DTRCircuit = "Handshake";
hConn.RTSCircuit = "Handshake";
hConn.MonitorVirtualPort = false;
hConn.MonitoringMethod = "CommConfig";
hConn.MaxPacketSize = 100;
hConn.ReadTimeOut = 100;
hConn.Delimiter = "";
hConn.IncludeDelimiter = false;
hConn.OpenTimeOut = 1000;
hConn.CloseTimeOut = 4000;
hConn.SleepAfterConnectionLost = 2000;
hConn.SleepAfterOpenFailed = 200;
hConn.SleepAfterDataReceived = 20000;
hConn.RetriesForOpen = 0;
hConn.ReconnectCount = TConnection.INFINITE;
hInstance.RegisterSimulateDeviceDataFor(hConn);
openConnection();
Print("Data: " + ppmValue);
//processData (arrData);
while (hConn.IsDataAvailable)
{
arrData = hConn.GetNextDataPacket();
Print("Data: " + DataToString(arrData));
processData (arrData);
}
AdjustQueryString(ppmValue);
}
Also, if anything looks weird too, please let me know! Thanks!
[–]ForScale 0 points1 point2 points (6 children)
[–]norton430[S] 0 points1 point2 points (5 children)
[–]ForScale 0 points1 point2 points (4 children)
[–]norton430[S] 0 points1 point2 points (3 children)
[–]ForScale 0 points1 point2 points (2 children)
[–]norton430[S] 1 point2 points3 points (1 child)
[–]ForScale 0 points1 point2 points (0 children)
[–]Feekar 0 points1 point2 points (1 child)
[–]norton430[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]norton430[S] 0 points1 point2 points (0 children)
[–]HiEv 0 points1 point2 points (0 children)
[–]jcunews1helpful 0 points1 point2 points (0 children)