Which format would be easier for other techs to decipher and also be portable?
Taking an integer and breaking it down to it's binary equivalent or just reading the individual bits themselves.
The application. 4 words with a total of 53 significant bits (each of the 53 bits represent a fault) are set up in the AB 5-20. I have linx gateway. The goal is to record the faults when the occur onto an excel spreadsheet. But I'm not sure if looking at each individual bit or the integer value would be easier for other techs to decipher.
with the integer values I would look at each word. If it is >0 then I'll need to break the word down to it's bits and see which ones are high. Each high bit is significant. Tied to this could be a count-up so that an array can be generated to hold all of the fault bit values (as each bit will have a value attached to it that will be placed on the excel sheet). I can think of at least 3 arrays needed: 1 for every bit, 1 for the value attached to the bit (subscripts would keep them in line) and a third for the number of values needed to be placed on the sheet (possibly a listcount command would work better instead and remove some of the nesting).
The alternative is to read each and every bit. While that seems simple enough, it just doesn't sound logical. There are 53 faults at this site, but some sites have 2x as much. The same format I'll be using on this unit will be replicated at other sites. So a generic routine that would work at all the sites seems to be the best way to go.
What do you guys think? Any tips/suggestions would be greatly appreciated.
Regards,
Russ
Taking an integer and breaking it down to it's binary equivalent or just reading the individual bits themselves.
The application. 4 words with a total of 53 significant bits (each of the 53 bits represent a fault) are set up in the AB 5-20. I have linx gateway. The goal is to record the faults when the occur onto an excel spreadsheet. But I'm not sure if looking at each individual bit or the integer value would be easier for other techs to decipher.
with the integer values I would look at each word. If it is >0 then I'll need to break the word down to it's bits and see which ones are high. Each high bit is significant. Tied to this could be a count-up so that an array can be generated to hold all of the fault bit values (as each bit will have a value attached to it that will be placed on the excel sheet). I can think of at least 3 arrays needed: 1 for every bit, 1 for the value attached to the bit (subscripts would keep them in line) and a third for the number of values needed to be placed on the sheet (possibly a listcount command would work better instead and remove some of the nesting).
The alternative is to read each and every bit. While that seems simple enough, it just doesn't sound logical. There are 53 faults at this site, but some sites have 2x as much. The same format I'll be using on this unit will be replicated at other sites. So a generic routine that would work at all the sites seems to be the best way to go.
What do you guys think? Any tips/suggestions would be greatly appreciated.
Regards,
Russ