PDA

View Full Version : Display Data from PINK



DosEdge
01-26-2007, 05:22 AM
I was trying to figure out how to display data from the PINK card back into a web page (HTML).· If anyone can give any advise, it would be really appreciated!

Thanks,

DosEdge

Kevin Wood
01-26-2007, 06:51 AM
Can you give a better description of what you are trying to do?-

Chris Savage
01-26-2007, 07:34 AM
Hello,

Page 6 of the documentation shows how to display variables on a web page. Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

DosEdge
01-27-2007, 05:10 AM
This a·portion code used for the project

TempBinCode VAr Word············ 'declared variable for the temp code from DS1620

Sign Var TempBinCode.Bit8·········'takes the most significant bit to determine its sign value

Temp_Sign Var Bit·····················'holds the temp sign value

SHIFTIN DQ,CLK,LSBPRE,[DSdata\9]·· 'Command for DS1620 to send binary temperature code back to BS2
LOW RST······································ 'Deactivate the DS1620
Temp_Sign =Sign····························'(expletive)ign the most significant bit to Temp_Sign of
TempBinCode= TempBinCode/2··········' Covert TempBinCode to C degrees
IF Temp_Sign = 0 THEN·BelowZero1···'Determine if not below·zero·to Below Zero

TempBinCode = TempBinCode|$FF00·· 'if·negative extend the bits

Below Zero:
'DEBUG SDEC TempBinCode,"degrees C", CR··' Trying to replace this DEBUG command·with a SEROUT command so I·can send the temperature value to a PINK variable so it can be displayed in a web page that I created.· SEROUT 8, 386,["!NB0W20: TempBinCode", CLS]· displays the string 'TempBinCode', but not the actually temperature value calculated in the PINK variable Nb_var20.

· TemBinCode=(TempBinCode*/$01CC)
IF Temp_Sign = 0 THEN BelowZero2
··TempBinCode = TempBinCode|$FF00
BelowZero2:
··TempBinCode =·TempBinCode +32
· DEBUG SDEC TempBinCode, "degrees F", CR



I need help with infrastructure for sending the calculated temp value from the·DS1620 to the BS2 then send that value to a PINK variable to be used in a web display

Franklin
01-27-2007, 05:17 AM
does this work? SEROUT 8, 386,["!NB0W20: "TempBinCode, CLS]

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

Chris Savage
01-27-2007, 05:23 AM
Actually, you would need to use something like...

SEROUT 8, 386,["!NB0W20:", DEC TempBinCode, CLS]

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

DosEdge
01-27-2007, 06:52 AM
The Situation is resolved!!!!!!

The portion of code below allows the user to retrieve the temperature from the DS1620 and send it to a PINK's variable·Nb_var20 to·be displayed in a web page(html). Using BS2 SEROUT command to send the temperature to the PINK. The code works fine!

TempBinCode VAr Word············ 'declared variable for the temp code from DS1620

Sign Var TempBinCode.Bit8·········'takes the most significant bit to determine its sign value

Temp_Sign Var Bit·····················'holds the temp sign value

HIGH RST

SHIFTIN DQ,CLK,LSBPRE,[DSdata\9]·· 'Command for DS1620 to send binary temperature code back to BS2
LOW RST······································ 'Deactivate the DS1620
Temp_Sign =Sign····························'(expletive)ign the most significant bit to Temp_Sign of
TempBinCode= TempBinCode/2··········' Covert TempBinCode to C degrees
IF Temp_Sign = 0 THEN·BelowZero1···'Determine if not below·zero·to Below Zero

TempBinCode = TempBinCode|$FF00·· 'if·negative extend the bits

Below Zero:

SEROUT 8, 386,["!NB0W20:", DEC TempBinCode, CLS]


TemBinCode=(TempBinCode*/$01CC)
IF Temp_Sign = 0 THEN BelowZero2
··TempBinCode = TempBinCode|$FF00
BelowZero2:
··TempBinCode =·TempBinCode +32