PS2Tap Menu▼

PS2Tap Menu

Introduction:

The PS2Tap sends a 42 byte long binary data packet using a 2.4 GHz 802.15.4 XBee-PRO wireless transceiver. Channel D is used with the default PAN ID. You will need a XBee-PRO or XBee modem to receive data for your application. We manufacture a variety of XBee and XBee-PRO modems.

Data Format:

'#'                       0  STX
UNIT ID PREFIX            1  First character (A-Z) for serial number
UNIT ID MSB               2  high byte of sending station ID
UNIT ID LSB               3  low byte of sending station ID
PACKET LENGTH             4  number of byte for packet including STX through CRC
PACKET TYPE               5  type of packet we are sending, 14
SYSTEM_STATE MSB          6 
SYSTEM_STATE LSB          7 
LAST_FAULT MSB            8 
LAST_FAULT LSB            9
USER_STATE MSB            10
USER_STATE LSB            11
AUTORUN_ENABLED MSB       12
AUTORUN_ENABLED LSB       13
BUS_VOLTAGE MSB           14
BUS_VOLTAGE LSB           15
AC_VOLTAGE MSB            16
AC_VOLTAGE LSB            17
DC_CURRENT MSB            18
DC_CURRENT LSB            19
DC_VOLTAGE MSB            20
DC_VOLTAGE LSB            21
AC_FREQUENCY MSB          22
AC_FREQUENCY LSB          23
OUTPUT_POWER MSB          24 Signed using high bit
OUTPUT_POWER LSB          25
ENERGY_PRODUCED MSB       26
ENERGY_PRODUCED LSB       27
AUTOSTART_COUNT MSB       28
AUTOSTART_COUNT LSB       29
SEQUENCE MSB              30
SEQUENCE LSB              31
SOFT_GRID MSB             32*
SOFT_GRID LSB             33*
AIO_DSP_REV MSB           34*
AIO_DSP_REV_LSB           35*
WIRELESS_LAST_OP          36*
WIRELESS_LAST_REG         37*
WIRELESS_LAST_RESULT MSB  38*
WIRELESS_LAST_RESULT LSB  39*
CRC MSB                   40  high byte of CRC on everything after STX and before CRC
CRC LSB                   41  low byte of CRC

* These bytes only in PS2Tap firmware versions newer than June 1, 2011.

Data Constants:

System State

0  INIT_PROCESSOR
1  INIT_PARAMS
2  RESET
3  WAITING INITIALIZING (STARTING COUNTDOWN)
4  WAITING INITIALIZING (COUNTDOWN DELAY)
5  WAITING FOR WIND
6  AC_RUN_INIT
7  AC_RUNNING
8  DC_RUN_INIT
9  RUNNING
10 FAULT_INIT
11 FAULT
12 MANUAL STOP (PRESS RESET)
13 MANRESET
14 FAULT LIMIT (PRESS RESET)

Error Codes

10   INTERNAL ERROR   IGBT Desat or control logic fault.  An occurrence of this fault requires that the unit be completely powered down to reset it.
1000 DC OVER VOLT 1   The DC Bus voltage has exceeded its maximum threshold
1500 DC OVER VOLT 2   The DC Input voltage has exceeded its maximum threshold
1250 DC UNDER VOLT    The internal DC Boost voltage has dropped below its minimum threshold
2030 AC OVER VOLT     The AC line voltage has exceeded its maximum threshold
2280 AC UNDER VOLT    The AC line voltage has dropped below its minimum threshold
2500 TURBINE PHASE    Indicates that there is a problem with one or more of the turbine input phases.  Bad connection, missing phase.
3000 OVER CURRENT     Phase A line current sensed by the converter module has exceeded its maximum current threshold
3020 OVER CURRENT     Phase C line current sensed by the converter module has exceeded its maximum current threshold
3050 OVER CURRENT     The DC Boost phase of the converter module has exceeded its maximum current threshold
4000 OVER TEMP        The internal high  temperature threshold has been exceeded
4250 UNDER TEMP       The internal low temperature threshold has been exceeded
7000 GROUND FAULT     An input phase appears to be shorted to chassis ground
8000 AC OVER FREQ    The frequency of the utility grid voltage went out of range. The upper range threshold was crossed, or a ROCOF fault occurred.
8100 AC UNDER FREQ    The frequency of the utility grid voltage went out of range.  The lower range threshold was crossed

Example Code:

Java Parsing Class

C CRC Function

int16 crc_chk(int8 *data, int8 length) {
	int8 j;
	int16 reg_crc=0xFFFF;

	while ( length-- ) {
		reg_crc ^= *data++;

		for ( j=0 ; j<8 ; j++ ) {
			if ( reg_crc & 0x01 ) {
				reg_crc=(reg_crc>>1) ^ 0xA001;
			} else {
				reg_crc=reg_crc>>1;
			}
		}	
	}
	
	return reg_crc;
}