|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
User_Byte
Are the User_Byte variables just for displaying info through the Dashboard? Are they all used to display breaker panel data? Can any value be put in them? I haven’t found any documentation on them.
Thanks |
|
#2
|
|||||
|
|||||
|
Re: User_Byte
User_Byte1 can be displayed on the LCD on the OI by pressing the select button until you see a 'u' before the numbers. All 6 of them can be seen on the Dashboard.
The default code stores the last breaker tripped in User_Byte1 (only works if you plug the breaker panel into the RC). Any 8-bit value can be stored in any of the User_Bytes. I use two of them to send out one pot value. I store the top 8 bits in one User_Byte and the last two bits in another. I'll see you guys at Drexel. If you need any more help do hesitate to ask MOE. I'm sure you can find us (we are the green people under the giant Tower of MOEdor )Last edited by The Lucas : 19-03-2005 at 17:27. |
|
#3
|
|||
|
|||
|
Re: User_Byte
What does this function do? It uses all the user_byte variables.
Thanks Code:
/*******************************************************************************
* FUNCTION NAME: Handle_Panel_Data
* PURPOSE: State machine for incomming Breaker Panel data.
*
*
* NOTE: Normally device specific code should reside in another file but
* for the purpose of simplification we chose to put it here.
*
* CALLED FROM: CheckUartInts
* ARGUMENTS: 1
* Argument Type IO Description
* -------- ------------- -- -----------
* data unsigned char I incoming data byte
* LIMITATIONS: The data from the breaker panel does not contain a checksum.
* See the breaker-panel-packet-definitions.pdf file for more info.
*******************************************************************************/
void Handle_Panel_Data(unsigned char data)
{
switch (IntState)
{
case 0: // 1st 0xC9
IntState = 0;
if (data == 0xC9) IntState = 1;
break;
case 1 : // 2nd 0x17
IntState = 0;
if (data == 0x17) IntState = 2;
break;
case 2 : //get DATA1
dataIn.data1Byte.allbits = data;
txdata.user_byte3 = data;
aBreakerWasTripped = (int) dataIn.data1Byte.bitselect.tripped;
IntState = 3;
break;
case 3 : //get DATA2
dataIn.data2 = data;
txdata.user_byte4 = data;
IntState = 4;
break;
case 4 : //get DATA3
dataIn.data3 = data;
txdata.user_byte5 = data;
IntState = 5;
break;
case 5 : //get DATA4
dataIn.data4 = data;
txdata.user_byte6 = data;
IntState = 0;
break;
default:
IntState= 0;
break;
}
}
|
|
#4
|
|||
|
|||
|
Re: User_Byte
Note that in order to pass inspection this year, your user byte must show the master firmware revision #, which is its default value, so be prepared to switch it back to this if you use it for something custom. (They are having a lot of problems with teams with old firmware I guess.)
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|