Select to view content in your preferred language

AUX Serial Port

995
2
Jump to solution
08-21-2012 06:22 PM
RonRioux1
New Contributor
I have an app that requires writing out a short string to the AUX Serial Port but I am having trouble getting started.  The documentation states: "The AUX functions are only called if the layer has declared that it requires the use of the AUX serial port."  However, I have not been able to figure out how to get a layer to declare that it requires use of the AUX port.  Any help in pointing me in the right direction would be greatly appreciated.
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
DeniseKing
Esri Regular Contributor
Hello Ron,

Not sure you're aware ArcPad Studio Help is now Online as announced earlier this month on ArcPad Team Blog. I suggest reviewing documentation on ArcPad Layer Definition File Schema, AUX event and OnClose, OnComm, & OnOpen attributes, and COMPORT element as well as the sample ArcPadPrefs.apx.

Here is a sample from past DevSummit presentation - Read and Parse AUX port example:

function ReadAUXForTemp ()
{
// called in OnComm event to read data from AUX port

  // read from the AUX port
  var strRawData = AUX.ReadLine();

  // parse the comma-delimited data
  var arrParsedData = strRawData.split(",");

  // if data is valid, return the temperature
  if (arrParsedData [0] == "$PTEMP")
      return (parseFloat(arrParsedData [1]));
  else
      return (NaN);
}

Hope this helps get you started,
Denise

View solution in original post

0 Kudos
2 Replies
DeniseKing
Esri Regular Contributor
Hello Ron,

Not sure you're aware ArcPad Studio Help is now Online as announced earlier this month on ArcPad Team Blog. I suggest reviewing documentation on ArcPad Layer Definition File Schema, AUX event and OnClose, OnComm, & OnOpen attributes, and COMPORT element as well as the sample ArcPadPrefs.apx.

Here is a sample from past DevSummit presentation - Read and Parse AUX port example:

function ReadAUXForTemp ()
{
// called in OnComm event to read data from AUX port

  // read from the AUX port
  var strRawData = AUX.ReadLine();

  // parse the comma-delimited data
  var arrParsedData = strRawData.split(",");

  // if data is valid, return the temperature
  if (arrParsedData [0] == "$PTEMP")
      return (parseFloat(arrParsedData [1]));
  else
      return (NaN);
}

Hope this helps get you started,
Denise
0 Kudos
RonRioux1
New Contributor
Hello Ron,

Not sure you're aware ArcPad Studio Help is now Online as announced earlier this month on ArcPad Team Blog. I suggest reviewing documentation on ArcPad Layer Definition File Schema, AUX event and OnClose, OnComm, & OnOpen attributes, and COMPORT element as well as the sample ArcPadPrefs.apx.

Here is a sample from past DevSummit presentation - Read and Parse AUX port example:

function ReadAUXForTemp ()
{
// called in OnComm event to read data from AUX port

  // read from the AUX port
  var strRawData = AUX.ReadLine();

  // parse the comma-delimited data
  var arrParsedData = strRawData.split(",");

  // if data is valid, return the temperature
  if (arrParsedData [0] == "$PTEMP")
      return (parseFloat(arrParsedData [1]));
  else
      return (NaN);
}

Hope this helps get you started,
Denise


Thanks Denise, that got me going in the right direction.
0 Kudos