Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
ViaMontefeltro,6–20156Milano(MI)–Italy Tel.+39(02)3088583–Fax+39(02)33406697 www.blinkmarine.com–[email protected] PK-1400_J1939_UM_REV1.2
PK-1400 J1939 USER MANUAL
THE PRESENT MANUAL IS FOR REFERENCE ONLY AND MIGHT BE NOT UP TO DATE TO THE LATEST VERSION. PLEASE CONTACT US FOR GETTING THE MOST UPDATED FILE
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 2 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
Table of contents1. HowtoconnectDeutsch4pin:............................................................................................................32. Reference.............................................................................................................................................33. Messageheaderdescription................................................................................................................44. GeneralDataFormat............................................................................................................................45. Defaultsettings....................................................................................................................................56. KeyContactstate(01h)........................................................................................................................57. LEDcommand(01h).............................................................................................................................68. SetLEDbrightnesslevel(02h)..............................................................................................................79. Setbacklightlevel(03h).......................................................................................................................710. Setstartupkeysmessage(28h).............................................................................................................711. Getsoftwarerevision(2Ah)..................................................................................................................812. SetstartupLEDshow(34h)..................................................................................................................813. SetSourceAddress(70h)......................................................................................................................914. Periodicstatetransmission(71h).........................................................................................................915. Eventstatetransmission(72h)...........................................................................................................1016. LEDAcknowledgment(73h)...............................................................................................................1017. AddressClaimatboot(74h)...............................................................................................................1118. Heartbeat(75h)..................................................................................................................................1219. PeriodicKeymessageperiod(77h)....................................................................................................1220. StartDemomode(7Ah)......................................................................................................................1321. Setbacklightlevelatstartup(7Bh).....................................................................................................1322. LEDdimatstartup(7Ch)....................................................................................................................1423. Setbacklightcolor(7Dh)....................................................................................................................1424. Baudratesetting(6Fh).......................................................................................................................1525. SetCANprotocol................................................................................................................................15 APPENDIX:DEMOModeinstructions.................................................................................................1626. Revisionhistory..................................................................................................................................16
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 3 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
1. How to connect Deutsch 4 pin:
EachendoftheCANbusisterminatedwith120Ωresistorsincompliancewiththestandardtominimizesignalreflectionsonthebus.Youmayneedtoplacea120ΩresistorbetweenCAN-LandCAN-H.
2. Reference Key:
LED:
PIN COLOUR FUNCTION1 Blue CANL2 White CANH3 Black Negativebattery4 Red Vbatt.(12-24V)
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 4 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
3. Message header description
The29-bitCANidentifierusedinJ1939isstructuredinthefollowingway.
Priority Reserved DataPage PDUFormat PDUSpecific SourceAddress3bits 1bit 1bit 8bits 8bits 8bits
TheproprietaryformatusedbyPKandPKPkeypadsisdefinedasfollows:
Priority=6.
Reserved=0.
Datapage=0.
PDUFormat=EFh(themessageisaddressable).
PDUSpecific=DestinationAddress.
ParameterGroupNumber(PGN)=61184(EF00h).
AnexampleofCANidentifierofmessagessenttothekeypadis18EF2100hwhere:
21histhedestinationaddress(keypad)
00histhesourceaddress.
AnexampleofCANidentifierofmessagessentbythekeypadis18EFFF21hwhere:
FFhreferstobroadcastmessages(nospecificdestinationaddress)
21histhesourceaddress(keypad).
4. General Data Format TheproprietaryprotocolhasdefinedageneralformatforthedatafieldsinthePGN61184.Theformatconsistsof:
1headerfield(2bytes)
1commandbyte
8bytes(theremainingfield)aredefinedspecificallyforeachcommand.
Thedatalengthis8bytes,unusedbitsandbytesaresettoall1’s(0xFF).
Byte0 04hByte1 1BhByte2 CommandByte3-7 Datarequiredforeachspecific
command
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 5 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
5. Default settings
Setting Defaultstatusorlevel HowtochangeCANbusBaudRate 250kbit/s Command6FhSourceAddress 21h Command70hKeypadIdentifier 21h Command70hHeartbeatMessage Disable Command75hPeriodicstatetransmission
Disable Command71h
Periodictransmissionperiod
100ms Command77h
Eventstatetransmission Enable Command72hAddressclaim Disable Command74hLEDbrightnesslevel 3Fh Command7ChStartupbacklight OFF Command7BhStartupLEDshow CompleteLEDSequence Command34hBacklightcolor Amber Command7DhLEDacknowledgement Disable Command73h
6. Key Contact state (01h) Thismessageissentbythekeypadtoindicatethestateofthecontacts.ThedestinationaddressissettoFFh:broadcastmessage.Seechapter2forKeynumberreference.
Byte0 04h HeaderbytesByte1 1BhByte2 01h ContactstatemessageByte3 XXh XX:KeyNumberByte4 YYh ContactState
00:SwitchOFF(Keyreleased)01:SwitchON(Keypressed)
Byte5 ZZh KeypadIdentifier(default21h)Byte6,7 FFh Notused
Examples:Direction Identifier Format Message DataFromkeypad 18EFFF21h Ext 041B01010121FFFF Key1ONFromkeypad 18EFFF21h Ext 041B01010021FFFF Key1OFFFromkeypad 18EFFF21h Ext 041B01020021FFFF Key2OFFFromkeypad 18EFFF21h Ext 041B01030121FFFF Key3ONFromkeypad 18EFFF21h Ext 041B01070121FFFF Key7ONFromkeypad 18EFFF21h Ext 041B01080021FFFF Key8OFFFromkeypad 18EFFF21h Ext 041B010A0121FFFF Key10ONFromkeypad 18EFFF21h Ext 041B010B0021FFFF Key11OFFFromkeypad 18EFFF21h Ext 041B010E0021FFFF Key14OFF
IftheEventstatetransmissionisenabled,theKeyContactstatemessageissentwhenakeyisswitched.IfthePeriodicstatetransmissionisenabled,everyPeriodictransmissionperiodaKeyContactstatemessageissentforeachbuttonofthekeypad.
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 6 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
7. LED command (01h) ThismessageissenttothekeypadtosetthestateoftheLEDindicators.Seechapter2forKeyandLEDnumberreference.
Byte0 04h HeaderbytesByte1 1BhByte2 01h LEDcommandmessageByte3 XXh XX:PK1400LEDnumber
Byte4 YYh LEDColor00:off01:red02:green03:color03*04:color04**
Byte5 ZZh LEDState00:off01:on02:blink03:alternateblink
Byte6 WWh LEDSecondaryColor(onlyforaltblink)00:off01:red02:green03:color03*04:color04**
Byte7 FFh Notused
Examples:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B0101010100FF LED1redTokeypad 18EF2100h Ext 041B0101000000FF LED1offTokeypad 18EF2100h Ext 041B0102030100FF LED2color03*Tokeypad 18EF2100h Ext 041B0104020100FF LED4greenTokeypad 18EF2100h Ext 041B010A040200
FFLED10color04**blinks
Tokeypad 18EF2100h Ext 041B0110020200FF LED16greenblinksTokeypad 18EF2100h Ext 041B010C010302FF LED12blinksredand
greeninalternatemode
*Obtainedbymixingredat50%andgreenat100%**Obtainedbymixingredat25%andgreenat100%
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 7 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
Set LED brightness level (02h) ThismessagesetsthevalueoftheindicatorLEDbrightness.Thevaluecanbesetfrom0to3Fh
fromaminimumvalueto100%oftheLEDdimmingrange.
Byte0 04h HeaderbytesByte1 1BhByte2 02h LEDbrightnesslevelmessageByte3 XXh XX:DimValue(default3Fh)
From00h(min)to3Fh(100%)Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B0220FFFFFFFF Brightnesssetto50%
8. Set backlight level (03h) ThismessagesetsthevalueofthebacklightLEDbrightness.Thevaluecanbesetfrom0to3Fhfor0to100%ofthebrightnessrange.
Byte0 04h HeaderbytesByte1 1BhByte2 03h BacklightbrightnesslevelmessageByte3 XXh XX:Value(default00h)
From00h(0%)to3Fh(100%)Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B0310FFFFFFFF Backlightsetto25%
9. Set startup keys message(28h) Thiscommandenablesthetransmissionduringpowerupofthestateofthekeys.Byte0 04h HeaderbytesByte1 1BhByte2 28h StartupkeysmessageByte3 XXh XX:
00hDisabled(default)01hEnabled
Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B2801FFFFFFFF Enablestartupkeys
message
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 8 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
10. Get software revision (2Ah)
Byte0 04h HeaderbytesByte1 1BhByte2 2Ah GetsoftwarerevisionByte3,7 FFh Notused
Answer:
Byte0 04h HeaderbytesByte1 1BhByte2 2Ah GetsoftwarerevisionByte3,6 XXhXXhXXhXXh SWrevisionASCIIByte7 00h Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B2AFFFFFFFFFF GetsoftwarerevisionFromKeypad
18EFFF21h Ext 041B2A56322E3100
V2.1
11. Set startup LED show (34h)
Byte0 04h HeaderbytesByte1 1BhByte2 34h StartupLEDshowByte3 XXh XX:
00hOFF01hCompleteledshow(default)02hAmberfastflash
Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad
18EF2100h Ext 041B3400FFFFFFFF SetLEDshowOFF
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 9 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
12. Set Source Address (70h) This message is used to change the keypad CAN Source Address and/or the KeypadIdentifier. Either or both the Source Address or Keypad Identifier may be changedindependently. Connecting only one keypad to the bus when changing the keypadaddress is recommended. If an invalidvalue is chosen, thennochange isdone to thestoredvalue.
Byte0 04h HeaderbytesByte1 1BhByte2 70h SetAddressmessageByte3 XXh XX:CANSourceAddress
From01htoFEhFFhNochange
Byte4 YYh YY:KeypadIdentifierFrom00htoFEhFFhNochange
Byte5,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad
18EF2100h Ext 041B700521FFFFFF
Setsourceaddress=05h,Setkeypadidentifier=21h.
13. Periodic state transmission (71h) ThismessageenablesordisablestheperiodictransmissionoftheKeystate.
When enabled, one contact state message is periodically sent for each button of thekeypad.Forsomekeypadmodelstherecouldbeadditionalmessages(e.g. thePKP2400has8buttonsbut11messagesaresent).
Theperiodissetto100msasdefaultvaluebutcanbechangedbycommand77h.
Byte0 04h HeaderbytesByte1 1BhByte2 71h Periodicstatetransmission
messageByte3 XXh XX:
00hDisabled(default)01hEnabled
Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B7101FFFFFFFF Enableperiodicstate
transmission
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 10 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
14. Event state transmission (72h) Thismessageenablesordisableseventdrivenkeystatetransmissions.Whenthisfeatureis enabled, the keypad transmits the state of a contact at the time that the contactchangesstate(pressedorreleased).
Byte0 04h HeaderbytesByte1 1BhByte2 72h EventstatetransmissionByte3 XXh XX:
00hDisabled01hEnabled(default)
Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad
18EF2100h Ext 041B7200FFFFFFFF
Disableeventstatetransmission
15. LED Acknowledgment (73h) ThismessageenablesordisablesthetransmissionoftheLEDAcknowledgementmessage.WhenthisfeatureisenabledthekeypadtransmitsanacknowledgementmessageeachtimeaLEDCommandisreceived.
Byte0 04h HeaderbytesByte1 1BhByte2 73h LEDAcknowledgementByte3 XXh XX:
00hDisabled(default)01hEnabled
Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B7301FFFFFFFF EnableLED
acknowledgementTokeypad 18EF2100h Ext 041B0101010302FF LEDCommandFromkeypad
18EFFF21h Ext 0003010102FFFFFF LEDAckmessage
LEDAcknowledgementmessage:
Byte0 00h Byte1 XXh XX:LEDstateByte2 YYh YY:LednumberByte3 PPh PP:PrimarycolorByte4 ZZh ZZ:SecondarycolorByte5,7 FFh Notused
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 11 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
16. Address Claim at boot (74h) Thismessageenablesordisablestheaddressclaimprocedure.
Byte0 04h HeaderbytesByte1 1BhByte2 74h AddressclaimatbootByte3 XXh XX:
00hDisabled(default)01hEnabled
Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B7401FFFFFFFF Enableaddressclaim
Address claiming procedure:
Undernormaloperation,thekeypadapplicationsendsanAddressClaimparametergroupatstartupandwaitsupto250msfortheotherdevicesconnectedtothesamenetworktosendamessagecontainingthedevice’saddressandname.Thekeypadcheckseveryresponse and compares the names to seewho has the highest priority. If a device isalreadyusingtheaddressandhasahigherpriority,thenanewaddressisselected,andtheprocessstartsover.Ifthekeypadhasahigherprioritythanthedeviceinusethenitwaits for other systems to reply,while the responding devicewill have to change itsaddressandsendanaddressclaimitself.Ifnomessageisreceivedafterthetime(250ms)isup,thenthedevicehasclaimedtheaddress.
Address claim parameter group:
Priority=6.
DestinationAddressshouldalwaysbetheGlobalAddressFFh
ParameterGroupNumber(PGN)=60928(EE00h).
DataLength=8
Data=NAMEfield
Example:Direction Identifier Format Message DataFromkeypad 18EEFF21h Ext 3F426F1A00823CC0
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 12 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
17. Heartbeat (75h) ThismessageenablesordisablesthetransmissionofHeartbeatmessage.Thismessageisdesignedtoindicatetootherdevicesonthebusthatthisunitcontinuestofunction.
Byte0 04h HeaderbytesByte1 1BhByte2 75h HeartbeatByte3 XXh XX:
00hDisabled(default)01hEnabled
Byte4 YYh YY:Periodinmilliseconds÷10From05h(50ms)toFEh(2.54sec)
Byte5,7 FFh NotusedExample:
Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B750132FFFF
FFSetheartbeatenabledwith500msperiod.
Heartbeatgeneratedmessage:
Byte0 04h HeaderbytesByte1 1BhByte2 F9h HeartbeatmessageByte3 XXh XX:Messagecounter,incremented
eachmessagesentByte4 K8K7K6K5K4K3K2K1 Buttonstateindicators
Eachbitrepresentsabuttonstate0:OFF1:ON
Byte5 0000K14K13K12K11K10K9
Byte6,7 FFh NotusedExample:
Direction Identifier Format Message DataFromkeypad
18EFFF21h Ext 041BF9030200FF21
Heartbeatmessagewithbutton2pressed.
18. Periodic Key message period (77h) ThismessagesetstheperiodtimefortheKeystatemessages(71h).Thisdoesnotenableordisablethemessages.
Byte0 04h HeaderbytesByte1 1BhByte2 77h PeriodickeymessageperiodByte3 XXh XX:Periodinmilliseconds÷10
From05h(50ms)toFEh(2.54sec)Byte4,7 FFh Notused
Example:
Direction Identifier Format Message DataTokeypad
18EF2100h Ext 041B770AFFFFFFFF Periodsetto100ms
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 13 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
19. Start Demo mode(7Ah) This message enables the Demomode function. Demomode is a special feature thatconsists in different LED states for each button pressing. Refer to the appendix “Demomode instructions” to try these special features. Disconnect and reconnect the keypadaftertheenablemessagetoenterthismode.ToexittheDemomode,sendtheDisableDemomodecommandoranothercommandmessage.
Byte0 04h HeaderbytesByte1 1BhByte2 7Ah DemomodeByte3 XXh XX:
00hDisabled(Default)01hEnabled
Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B7A01FFFFFFFF Demomodeenabled
20. Set backlight level at startup (7Bh) Thismessagesetsthevalueofthebacklightatkeypadpowerup.Thevaluecanbesetfrom0to3Fhfor0to100%ofthebrightnessrange.
Byte0 04h HeaderbytesByte1 1BhByte2 7Bh SetbacklightatstartupByte3 XXh XX:Value
From00h(0%)to3Fh(100%)Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B7B06FFFFFFFF Backlightatstartup10%
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 14 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
21. LED dim at startup (7Ch) ThismessagesetsthevalueoftheindicatorLEDbrightnessatkeypadpowerup.Thevaluecanbesetfromaminimumvalueto3Fhfor0to100%oftheLEDdimmingrange.
Byte0 04h HeaderbytesByte1 1BhByte2 7Ch LEDdimatstartupByte3 XXh XX:Value
From00h(min)to3Fh(100%)Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B7C10FFFFFFFF LEDdimsetto25%
22. Set backlight color (7Dh) Thismessagesetsthecolorofthebacklight.
Byte0 04h HeaderbytesByte1 1BhByte2 7Dh SetbacklightcolorByte3 XXh XX:color
01:red02:green03:blue04:yellow05:cyan06:magenta07h:white/lightblue08h:amber/orange09h:yellow/green
Byte4,7 FFh Notused
Example:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B7D02FFFFFFFF Setbacklightcolorto
green
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 15 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
23. Baud rate setting (6Fh) ThismessageisusedtochangethebaudrateoftheCANbus.Connectingonlyonekeypadtothebuswhenchangingthebaudrateisrecommended.Ifaninvalidvalueischosen,thennochangeisdonetothestoredvalue.
Byte0 04h HeaderbytesByte1 1BhByte2 6Fh SetbaudratemessageByte3 02h 500kbit/s
03h 250kbit/s
Byte4,7 FFh NotusedExample:
Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B6F02FFFFFFFF Setbaudrate=500kbit/s
24. Set CAN protocol ThissetofmessagesareusedtochangetothedesiredCANbusprotocol.
• ChangefromJ1939toCANopen:Direction Identifier Format Message DataTokeypad 18EF2100h Ext 041B8000FFFFFFFF ChangetoCANopen
• ChangefromCANopentoJ1939:
Direction Identifier Format Message DataTokeypad 615h Std 2BFF200101 ChangetoJ1939
Via Montefeltro, 6 – 20156 Milano (MI) – Italy - 16 - Tel. +39 (02) 3088583 – Fax +39 (02) 33406697 www.blinkmarine.com – [email protected] PK-1400_J1939_UM_REV1.2
APPENDIX: DEMO Mode instructions InDEMOModeyoucantrythefollowingfunctionsbypressingbuttonsonthePK1400.
Enteringthismode,youturnonkey-LEDswithcolorred.
Forthekey1,eachtimeyoupressthebuttonyoucanchangethecolorofkey-LEDSwiththissequence:
1. Green;2. Color03*;3. Color04**;4. OFF.
Forthekey4,eachtimethatyoupressthebutton,therearedifferentstepsinthissequence:
1. CompleteLEDshowofallcolors:atfirstwithred,thengreen,color03*,andattheendcolor04**;2. Turningon/offeachsinglekey-LEDwiththepossibilitytochangecolorpressingkey1;3. Pausestep2;4. Returntothestartingdemomodestate.
Ifyoupresstheotherkeys,youhavenoeffect.
25. Revision history
Date Manual Revision
Comment Related SW version
03/02/2017 1.0 FirstRelease 23/11/2017 1.1 SecondRelease
- Replaced0%withminvalueforLEDbrightness
- Correctedheartbeatgeneratedmessagewithexactnumberofkeys
- UpdatedLEDacknowledgementmessagewithextrabytesconcerningprimaryandsecondarycolor
- Addedbaudratesettingcommand
SW2.x
14/03/2018 1.2 Thirdrelease:- replacedthewordsamber/orangeand
yellowwithcolor03and04in‘’LEDCOMMAND’’explaininghowthesecolorsareobtained
- Added‘’DEMOmodeinstructions’’- Updatedtothelatestsoftwareversion
thevaluesoftheallowableaddressesrangeinthecommand‘’SETSOURCE/KEYPADADDRESS/IDENTIFIER’’
SWx.x
*Obtainedbymixingredat50%andgreenat100%**Obtainedbymixingredat25%andgreenat100%