output format question - XML?

Do you guys know what kind of serial.prints/writes changes I need to make in this sketch to make the output in this format?
Thanks!

send this out every second for the 15 temps.

ChannelNumber Description value value mappedvalue ChannelNumber Description value value mappedvalue

etc…for the 15 total

#include <SPI.h>

byte SSarray[] = {
  10,7,6,5,4,21,20,19,18,17,16,15,14,29,28}; // slave select pins. See Bobuino pins_arduino.h & schematic

byte config_write = 0x80;

byte RTD_MSB_write = 0x81; // not valid
byte RTD_LSB_write = 0x82; // not valid
byte High_Fault_Threshold_MSB_write = 0x83;
byte High_Fault_Threshold_LSB_write = 0x84;
byte Low_Fault_Threshold_MSB_write = 0x85;
byte Low_Fault_Threshold_LSB_write = 0x86;
byte Fault_Status_write = 0x87; // not valid 

byte config_read = 0x00;
byte RTD_MSB_read = 0x01;
byte RTD_LSB_read = 0x02;
byte High_Fault_Threshold_MSB_read = 0x03; // 83h FFh R/W
byte High_Fault_Threshold_LSB_read = 0x04; // 84h FFh R/W
byte Low_Fault_Threshold_MSB_read = 0x05; // 85h 00h R/
byte Low_Fault_Threshold_LSB_read = 0x06; // 86h 00h R/W
byte Fault_Status = 0x07; // read 07h R

int ADCcode;
byte convert;
float temperature;
byte Fault_Error;

byte x=0; // chip counter
byte y=0; // register counter
byte msb_rtd;
byte lsb_rtd;

byte incomingByte;
byte incomingByte1;
byte incomingByte2;
byte incomingByte3;
byte incomingByte4;
unsigned long currentMicros;
unsigned long previousMicros;
unsigned long elapsedMicros;
unsigned long interval = 100UL; // Set lo

byte regHi;
byte regLo;
byte regNo;
byte valueHi;
byte valueLo;
byte value;
byte command;
byte hiNib;
byte loNib;
byte channelCount = 14;

static float a = 0.00390830;
static float b = -0.0000005775;
static float c = -0.00000000000418301;
float Reference_Resistor = 4000.;                     //Reference Resistor installed on the board.
float RTD_Resistance = 1000.;            

void setup(){
  // set up output pins
  for (x=0; x<15; x=x+1){
    pinMode(SSarray[x], OUTPUT);  // set Slave Select pins as outputs
    digitalWrite (SSarray[x],  HIGH); // set Slave Select pins high
  }

  Serial.begin(115200);

  SPI.begin(); //
  SPI.setDataMode(SPI_MODE1); // choices 0,1,2,3 - use 1,3 for MAX31865
  SPI.setClockDivider(SPI_CLOCK_DIV128); // choices 2,4,8,16,32,64,128.  2 = 8 MHz, 4 = 4 MHz, 8 = 1 MHz, etc.  5 MHz max for MAX31865

  x=0; // setup "chip pointer" x for use later, eventually loop thru 15 MAX31865 chips
} // end setup

void loop(){
  // Alternate between looking for incoming message, read/send out a temperature
  currentMicros = micros();
  elapsedMicros = currentMicros - previousMicros;
  if (elapsedMicros >=1000000UL){  // 1 second? take a reading
    previousMicros = previousMicros + 1000000UL;
    channelCount = channelCount +1;
    if (channelCount ==15){
      channelCount = 0; // reset
    }
    Serial.println("");
    Serial.print ("Channel ");
    Serial.print (channelCount+1);
    Serial.print (" ");
    // check fault register
    // send read address, read the data
    digitalWrite (SSarray[channelCount], LOW);
    digitalWrite (SSarray[channelCount], LOW);
    SPI.transfer(Fault_Status);  // send out register #
    delayMicroseconds(10);
    Fault_Error = SPI.transfer(0); // read register contents back
    digitalWrite(SSarray[channelCount], HIGH);
    Serial.print ("Fault code ");
    Serial.print (Fault_Error, HEX);
    Serial.println(" ");

    if (Fault_Error == 0){
      // send write address, data to start a conversion
      digitalWrite (SSarray[channelCount], LOW); 
      digitalWrite (SSarray[channelCount], LOW);
      SPI.transfer(0x80);  // send out register #
      delayMicroseconds(10);  // see if slight delay between write & read  helps
      SPI.transfer(0xA0); // send out data 0b10100000 or 0b110000?
      digitalWrite(SSarray[channelCount], HIGH);

      delay (55); // conversion time

      digitalWrite (SSarray[channelCount], LOW);
      digitalWrite (SSarray[channelCount], LOW);
      SPI.transfer(RTD_MSB_read);  // send out register #
      delayMicroseconds(10);
      msb_rtd = SPI.transfer(0); // read register contents back
      digitalWrite(SSarray[channelCount], HIGH);

      digitalWrite (SSarray[channelCount], LOW);
      digitalWrite (SSarray[channelCount], LOW);
      SPI.transfer(RTD_LSB_read);  // send out register #
      delayMicroseconds(10);
      lsb_rtd = SPI.transfer(0); // read register contents back
      digitalWrite(SSarray[channelCount], HIGH);

      Serial.print ("ADCcode = ");
      ADCcode = (msb_rtd<<8) + lsb_rtd;
      Serial.println (ADCcode, HEX);
      ADCcode = ADCcode >>1;
      temperature = float((ADCcode/32.) - 256.);
      Serial.print ("Linear Temperature Deg C ");
      Serial.println (temperature, 1);

      // Hani conversion
      float RTD = ((msb_rtd << 7)+((lsb_rtd & 0xFE) >> 1));   //Combining RTD_MSB and RTD_LSB to protray decimal value. Removing MSB and LSB during   shifting/Anding
      float R = (RTD*Reference_Resistor)/32768; //Conversion of ADC RTD code to resistance 
      float Temp = -RTD_Resistance*a + sqrt(RTD_Resistance*RTD_Resistance*a*a - 4*RTD_Resistance*b*(RTD_Resistance-R));   //Conversion of RTD resistance to Temperature
      Temp = Temp/(2*RTD_Resistance*b);
      Serial.print("Hani Temperature: "); 
      Serial.println(Temp, 1 );       //Printing Temperature on console
      Serial.println("");

      byte fault_test = lsb_rtd&0x01;
      if (fault_test == 0x01){
        Serial.print ("Channel ");
        Serial.print (channelCount+1);
        Serial.print (" Error was detected. The RTD resistance measured is not within the range specified in the Threshold Registers.");  
        Serial.println(" "); 
      }
    } // 1 channel/second test
  }
  else {
    // fault detected
    byte temp = 0;            //temporary variable created: Purpose is to find out which error bit is set in the fault register
    temp = Fault_Error & 0x80;      //Logic Anding fault register contents with 0b10000000 to detect for D7 error bit
    if(temp>0) {
      Serial.println("Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value");
      Serial.println("");
    }
    temp = Fault_Error & 0x40;
    if(temp>0) {
      Serial.println("Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value."); 
      Serial.println("");  
    }
    temp = Fault_Error & 0x20;
    if(temp>0){
      Serial.println("Bit D5 is Set. Vref- is greater than 0.85 * Vbias");
      Serial.println("");  
    }
    temp = Fault_Error & 0x10;
    if(temp>0){
      Serial.println("Bit D4 is Set. Please refer to data sheet for more information");
      Serial.println("");  
    }
    temp = Fault_Error &0x08;
    if(temp>0){
      Serial.println("Bit D3 is Set. Please refer to data sheet for more information");
      Serial.println("");  
    }
    temp = Fault_Error &0x04;
    if(temp>0){
      Serial.println("Bit D2 is Set. Please refer to data sheet for more information");
      Serial.println("");  
    }

    // send write address to clear faults
    digitalWrite (SSarray[channelCount], LOW); 
    digitalWrite (SSarray[channelCount], LOW);
    SPI.transfer(0x80);  // send out register #
    delayMicroseconds(10);  // see if slight delay between write & read  helps
    SPI.transfer(0b10000010); // send out data - Fault register isn't cleared automatically. Users are expected to clear it after every fault.
    digitalWrite(SSarray[channelCount], HIGH);
    delay (700);

    // send write address to clear faults
    digitalWrite (SSarray[channelCount], LOW); 
    digitalWrite (SSarray[channelCount], LOW);
    SPI.transfer(0x80);  // send out register #
    delayMicroseconds(10);  // see if slight delay between write & read  helps
    SPI.transfer(0b10100000); // send out data - Setting the device in autoconfiguration again. 0b10100000 or 0b11000000?
    digitalWrite(SSarray[channelCount], HIGH);
    delay (700);

  }
}

By ‘the fifteen total’ I assume you mean the channels 0 … 14.

You don’t show a closing tag to match the opening tag for - is there supposed to be one?

The basic scheme would be that when setting channelCount to zero you print the opening tag . For each item you would print the opening and closing tags for each element with the content in between.

If you want to close the interfaces element after the fourteenth element then you would do that before opening the next one. I don’t know whether you want to have the XML indented like that - usually, XML is layout neutral and linefeeds and indentation would not be used unless you were formatting it for display to a human (in which case the displaying software would do that layout for you. In other words, you would do stuff like:

    if (channelCount ==15){
      Serial.print("</interface><interface>
      channelCount = 0; // reset
    }
    Serial.print("<item><id>");
    Serial.print(channelCount);
    Serial.print("</id><description>");
    Serial.print(" ...

If it was me I’d implement functions to write an opening and closing tag with the tag name specified by a parameter, and a function to write opening and closing tags with a string in between them, but I seem to remember you aren’t keen on functions. :wink:

Yeah, I'm not doing functions for this. I don't know much about the opening/closing whatever's in this, is all new to me. The guys I wrote the original code for are asking for the format change, and the request was their idea of how it might go. I'll give it a shot. It's all buried in print statements so compiling shouldn't be an issue, I guess I can fake some outputs with an Uno and see what comes out.

CrossRoads:
I don’t know much about the opening/closing whatever’s in this, is all new to me.

The idea of XML is that it is a tree structure of elements. Each element consists of an opening tag “” and a closing tag “</something>” with the element content in between them. The name in the opening and closing tags must match. It’s all very much like the structure of compound statements in C++ if you think of opening tags as being a named ‘{’ and closing tags being a named ‘}’ which must pair up with the opening tag.

(The code to print this out will be very repetitive - it would be much shorter and simpler if you implemented the repeating behaviour as functions.)

I don't know if there is any library that will format data to xml string. I just use brute force to add the xml open and closing tag as I build the string.

So, am I getting the right idea here?

Serial.print ("<interface>");  // start of output sequence
} // end setup

void loop(){
// Alternate between looking for incoming message, read/send out a temperature
currentMicros = micros();
elapsedMicros = currentMicros - previousMicros;
if (elapsedMicros >=1000000UL){ // 1 second? take a reading
previousMicros = previousMicros + 1000000UL;
channelCount = channelCount +1;
if (channelCount ==15){
Serial.print ("</interface>"); // end of output sequence
channelCount = 0; // reset
Serial.print ("<interface>"); // start of next output sequence
}
Serial.print("<item>");
/*
Serial.print("<id>ChannelNumber</id>");
Serial.print("<description>Description value</description>");
Serial.print("<ADCcode>value</ADCcode>");
Serial.print("<faultCode>mappedvalue</faultCode>");
Serial.print("<linearTemp></linearTemp> ");
Serial.print("<haniTemp></haniTemp>");
*/
Serial.println("");
Serial.print("<id>ChannelNumber");
Serial.print ("Channel ");
Serial.print (channelCount+1);
Serial.print (" ");
Serial.print("</id>");
// check fault register
// send read address, read the data
digitalWrite (SSarray[channelCount], LOW);
digitalWrite (SSarray[channelCount], LOW);
SPI.transfer(Fault_Status); // send out register #
delayMicroseconds(10);
Fault_Error = SPI.transfer(0); // read register contents back
digitalWrite(SSarray[channelCount], HIGH);
Serial.print("<description>");
Serial.print ("Fault code ");
Serial.print (":</description>");
Serial.print("<faultCode>");
Serial.print (Fault_Error, HEX);
Serial.println(" ");
Serial.print("</faultCode>");


if (Fault_Error == 0){
// send write address, data to start a conversion
digitalWrite (SSarray[channelCount], LOW); 
digitalWrite (SSarray[channelCount], LOW);
SPI.transfer(0x80); // send out register #
delayMicroseconds(10); // see if slight delay between write & read helps
SPI.transfer(0xA0); // send out data 0b10100000 or 0b110000?
digitalWrite(SSarray[channelCount], HIGH);

delay (55); // conversion time

digitalWrite (SSarray[channelCount], LOW);
digitalWrite (SSarray[channelCount], LOW);
SPI.transfer(RTD_MSB_read); // send out register #
delayMicroseconds(10);
msb_rtd = SPI.transfer(0); // read register contents back
digitalWrite(SSarray[channelCount], HIGH);

digitalWrite (SSarray[channelCount], LOW);
digitalWrite (SSarray[channelCount], LOW);
SPI.transfer(RTD_LSB_read); // send out register #
delayMicroseconds(10);
lsb_rtd = SPI.transfer(0); // read register contents back
digitalWrite(SSarray[channelCount], HIGH);

Serial.print("<ADCcode>");
Serial.print ("ADCcode = ");
ADCcode = (msb_rtd<<8) + lsb_rtd;
Serial.println (ADCcode, HEX);
Serial.print("</ADCcode>");
ADCcode = ADCcode >>1;
temperature = float((ADCcode/32.) - 256.);

Serial.print("<linearTemp> ");
Serial.print ("Linear Temperature Deg C ");
Serial.println (temperature, 1);
Serial.print("</linearTemp> ");

// Hani conversion
float RTD = ((msb_rtd << 7)+((lsb_rtd & 0xFE) >> 1)); //Combining RTD_MSB and RTD_LSB to protray decimal value. Removing MSB and LSB during shifting/Anding
float R = (RTD*Reference_Resistor)/32768; //Conversion of ADC RTD code to resistance 
float Temp = -RTD_Resistance*a + sqrt(RTD_Resistance*RTD_Resistance*a*a - 4*RTD_Resistance*b*(RTD_Resistance-R)); //Conversion of RTD resistance to Temperature
Temp = Temp/(2*RTD_Resistance*b);
Serial.print("<haniTemp>");
Serial.print("Hani Temperature: "); 
Serial.println(Temp, 1 ); //Printing Temperature on console
Serial.println("");
Serial.print("</haniTemp>");

byte fault_test = lsb_rtd&0x01;
if (fault_test == 0x01){
Serial.print ("Channel ");
Serial.print (channelCount+1);
Serial.print (" Error was detected. The RTD resistance measured is not within the range specified in the Threshold Registers."); 
Serial.println(" "); 
}
Serial.print("</item>");
} // 1 channel/second test
}

you might use the F macro for the static strings.

further you can use the tree structure as base for your code

void printInterface(int itemCount)
{
    Serial.println("<interface>");
    for (int i=0; i<itemCount; i++)
    {
        printItem(i);
    }
    Serial.println("</interface>");
}

void printItem(int channel)
{
    Serial.println("  <item>");
    {
        printID(channel);
        printDescription(channel);
        printADCCode(channel);
        printFaultCode(channel);
        printLinearTemp(channel);
        printHaniTemp(channel);
    }
    Serial.println("  </item>");
}

void printID(int channelNumber)
{
    Serial.print("    <id>");
    Serial.print(ID[channelNumber]);  // lookup array
    Serial.println("    </id>");
}

void printDescription(int channelNumber)
{
    Serial.print("    <description>");
    Serial.print(description[channelNumber]);  // lookup array
    Serial.println("    </description>");
}

void printADCCode(int channelNumber)
{
    Serial.print("    <ADCcode>");
    Serial.print(ADCcode[channelNumber]);  // lookup array
    Serial.println("    </ADCcode>");
}

etc.

do you know if println generates \r\n ? if so, you must not use it inside xml tags, as only \n is valid between xml tags. strictly speaking, all white spaces can be trimmed between the opening xml tag and the first character of the element text, and between the last character of the element text and the closing xml tag. a white space is defined as space, \r, \n, \t.

It has no XML header .... it only looks like it. AFAIK many parsers ignore \r but strictly you're right

@robtillaart,
I am not adding all those function calls - that will just hurt performance.
(even if just marginally - I am against them on the principal that jumping back & forth hurts performance; and also makes it hard to review with written code bouncing back & forth on the screen). The code is not so huge that inlining the serial prints will break the bank for the 128K of flash available in a 1284P.

@robtillaart, doughboy,
Do in need serial.println at all? I had those in there to make the prints easier to read in the serial monitor. If a PC or something is accepting all these xml codes, would the or indicate the end of some data instead?

CrossRoads: So, am I getting the right idea here?

Can you please post a sample of the XML produced by this code ?

CrossRoads:
@robtillaart,
I am not adding all those function calls - that will just hurt performance.
(even if just marginally - I am against them on the principal that jumping back & forth hurts performance; and also makes it hard to review with written code bouncing back & forth on the screen). The code is not so huge that inlining the serial prints will break the bank for the 128K of flash available in a 1284P.

Fair enough, but the performance degradation of printing is much higher than those function calls.
But you’re right the code base is not so huge (yet)

CrossRoads:
@robtillaart, doughboy,
Do in need serial.println at all? I had those in there to make the prints easier to read in the serial monitor. If a PC or something is accepting all these xml codes, would the or indicate the end of some data instead?

The indentation is mostly for us mere mortals, computers do not need them.
in fact every white space and newline will hurt performance …

\r\n is ok after the closing tag. likewise \t or spaces to indent before opening tag to make it readable.
like

<a>a</a>\r\n

but \r is not ok between the tags. (with exceptions, but that is getting too technical)

BTW, \r is not just ignored by xml parsers, it must not be present inside the tags, xml parsers are required to normalize presence of line endings in the infoset (to use the proper w3c spec terminology),

I'll compile & run when I get home after fencing class, see what it looks like. Sounds like I may need a .println after the 15th read just to keep viewable on the serial monitor, and the rest can be removed.

This was the whole program - just read the 15 MAX31865 and spit out the data.

Triggered by your question I wrote a simple XMLwriter lib see - http://forum.arduino.cc/index.php?topic=197823 -

Thanx for the inspiration

This is what I wrote yesterday was outputting:

<interface>
<item>
<id>ChannelNumberChannel 1 </id>
<faultCode>FF</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>
<faultDescription>Bit D5 is Set. Vref- is greater than 0.85 * Vbias</faultDescription>
<faultDescription>Bit D4 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D3 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D2 is Set. Please refer to data sheet for more information</faultDescription>
<item>
<id>ChannelNumberChannel 2 </id>
<faultCode>FF</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>
<faultDescription>Bit D5 is Set. Vref- is greater than 0.85 * Vbias</faultDescription>
<faultDescription>Bit D4 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D3 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D2 is Set. Please refer to data sheet for more information</faultDescription>
<item>
<id>ChannelNumberChannel 3 </id>
<faultCode>FF</faultCode>
<item>
<id>ChannelNumberChannel 4 </id>
<faultCode>FF</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>
<faultDescription>Bit D5 is Set. Vref- is greater than 0.85 * Vbias</faultDescription>
<faultDescription>Bit D4 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D3 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D2 is Set. Please refer to data sheet for more information</faultDescription>
<item>
<id>ChannelNumberChannel 5 </id>
<faultCode>0</faultCode>
<ADCcode>ADCcode = 458E</ADCcode>
<linearTemp> Linear Temperature Deg C 22.2</linearTemp> 
<haniTemp>Hani Temperature: 22.3</haniTemp>
</item>
<item>
<id>ChannelNumberChannel 6 </id>
<faultCode>FF</faultCode>
<item>
<id>ChannelNumberChannel 7 </id>
<faultCode>FF</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>
<faultDescription>Bit D5 is Set. Vref- is greater than 0.85 * Vbias</faultDescription>
<faultDescription>Bit D4 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D3 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D2 is Set. Please refer to data sheet for more information</faultDescription>
<item>
<id>ChannelNumberChannel 8 </id>
<faultCode>FF</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>
<faultDescription>Bit D5 is Set. Vref- is greater than 0.85 * Vbias</faultDescription>
<faultDescription>Bit D4 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D3 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D2 is Set. Please refer to data sheet for more information</faultDescription>
<item>
<id>ChannelNumberChannel 9 </id>
<faultCode>FF</faultCode>
<item>
<id>ChannelNumberChannel 10 </id>
<faultCode>FF</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>
<faultDescription>Bit D5 is Set. Vref- is greater than 0.85 * Vbias</faultDescription>
<faultDescription>Bit D4 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D3 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D2 is Set. Please refer to data sheet for more information</faultDescription>
<item>
<id>ChannelNumberChannel 11 </id>
<faultCode>FF</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>
<faultDescription>Bit D5 is Set. Vref- is greater than 0.85 * Vbias</faultDescription>
<faultDescription>Bit D4 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D3 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D2 is Set. Please refer to data sheet for more information</faultDescription>
<item>
<id>ChannelNumberChannel 12 </id>
<faultCode>FF</faultCode>
<item>
<id>ChannelNumberChannel 13 </id>
<faultCode>FF</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>
<faultDescription>Bit D5 is Set. Vref- is greater than 0.85 * Vbias</faultDescription>
<faultDescription>Bit D4 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D3 is Set. Please refer to data sheet for more information</faultDescription>
<faultDescription>Bit D2 is Set. Please refer to data sheet for more information</faultDescription>
<item>
<id>ChannelNumberChannel 14 </id>
<faultCode>80</faultCode>
<faultDescription>Bit D7 is Set. Is the RTD device disconnected from RTD+ or RTD-? Please verify your connection and High Fault Threshold Value</faultDescription>
<item>
<id>ChannelNumberChannel 15 </id>
<faultCode>80</faultCode>
</interface>

The guys I wrote it for are gonna tweak it up some, deciding what to do still about the fault messages it seems.

This part doesn’t look quite right:

ChannelNumberChannel 6

Wouldn’t something like this be better?

Channel 6

there is a problem here

<faultDescription>Bit D6 is Set. It's Possible your RTD+ and RTD- is shorted. Please verify your connection and your Low Fault Threshold Value.</faultDescription>

single quote (or apostrophe) is not allowed. you must escape it. The following characters must be escaped
" "
’ ’
< <

>
& &

Thanks, I’ll pass those along.