Hide thumbs Also See for YDNB-07N:

Advertisement

Quick Links

User Manual
Yacht Devices NMEA 2000 Bridge YDNB-07
also covers models
YDNB-07N, YDNB-07R
Firmware version
1.42
2022

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the YDNB-07N and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Yacht Devices YDNB-07N

  • Page 1 User Manual Yacht Devices NMEA 2000 Bridge YDNB-07 also covers models YDNB-07N, YDNB-07R Firmware version 1.42 2022...
  • Page 2 © 2022 Yacht Devices Ltd. Document YDNB07-005. May 24, 2022. Web: http://www.yachtd.com/ NMEA 2000® is a registered trademark of the National Marine Electronics Association. SeaTalk NG is a registered trademark of Raymarine UK Limited. Garmin® is a registered trademark of Garmin Ltd.
  • Page 3: Table Of Contents

    Contents Introduction Warranty and Technical Support I. Product Specification II. Installation and Connection to NMEA 2000 or CAN Networks III. LED Signals IV. MicroSD Slot and Card’s Compatibility V. Loading of Programs into the Device VI. Structure and Basic Syntax of the Program VII.
  • Page 4: Introduction

    Introduction Yacht Devices NMEA Bridge unifies two physical NMEA 2000 networks into a single logical network, smoothly exchanging messages between them. The Device also allows to organize arbitrary filtering, processing and routing of any CAN bus messages. This can accomplish the following tasks:...
  • Page 5 Create custom NMEA 2000 data procesing device, for example, implement complex digital switching rules for Yacht Devices NMEA 2000 Digital Switching equipment, such as: delayed and timed switching, auto-off, conditional switching or trigger warnings on a chartplotter when certain data values are over the threshold.
  • Page 6: Warranty And Technical Support

    Warranty and Technical Support The Device warranty is valid for two years from the purchase date. If the Device was purchased in a retail store, when applying under a warranty case, the sale receipt may be requested. The Device warranty is terminated in case this Manual instructions violating, case integrity breach, repair or modification of the Device without manufacturer’s written permission.
  • Page 7: Product Specification

    I. Product Specification Figure 1. Drawing of YDNB-07R model of the Bridge Our devices are supplied with different types of NMEA 2000 connectors. Models with the suffix R at the end of model name are equipped with NMEA 2000 connectors compatible with Raymarine SeaTalk NG (as at the picture above).
  • Page 8 Device’s case length (without connector) CAN1 / CAN2 54/40 Weight without MicroSD card Yacht Devices Ltd declares that this product is compliant with the essential requirements of EMC directive 2004/108/EC. Dispose of this product in accordance with the WEEE Directive. Do not mix electronic disposal with domestic or industrial refuse.
  • Page 9: Installation And Connection To Nmea 2000 Or Can Networks

    II. Installation and Connection to NMEA 2000 or CAN Networks Never connect both connectors of the Device to the same NMEA 2000 or CAN network. This can flood the network with infinite forwarding of messages and cause a temporary inoperability of the network. The Device requires no maintenance.
  • Page 10 Figure 2. Typical NMEA 2000 bridging application network layout Please remember that a NMEA 2000 network requires a separate power supply and two terminators, on each backbone end. If the Device is used as a bridge, connecting two existing NMEA 2000 network segments, you have to make sure to add terminators to each backbone segment and power both segments from a 12V power supply.
  • Page 11: Led Signals

    III. LED Signals Signal with period of 5 seconds, two flashes of the LED. The first flash indicates the condition of the CAN1 interface network. Green LED flash indicates that data has been received or successfully sent on CAN1 interface within the last 5 seconds period, red if not. The second flash indicates the condition of the CAN2 interface network.
  • Page 12: Microsd Slot And Card's Compatibility

    IV. MicroSD Slot and Card’s Compatibility The Device has a slot for a MicroSD card that allows you to configure the Device (see Section V) and update the firmware (see Section XI). The Device slot has a ‘push-push’ mechanism that works on a spring and ensures proper card fixation.
  • Page 13 Since the MicroSD slot is usually not in use when the Device is working, we recommend to seal it with the sticker supplied with the Device or with a piece of tape to prevent water from entering the Device through the slot.
  • Page 14: Loading Of Programs Into The Device

    V. Loading of Programs into the Device Place YDNB.CFG file with the program into the root directory of a MicroSD card with a FAT or FAT32 file system. Insert the MicroSD card into the Device. After a few seconds, you should observe three LED flashes: Three red flashes indicates that the card cannot be read.
  • Page 15: Structure And Basic Syntax Of The Program

    VI. Structure and Basic Syntax of the Program The program defines algorithms and rules for the processing and forwarding of NMEA 2000 or other CAN messages that the Device receives via the CAN1 and CAN2 interfaces. The program consists of settings, built-in functions, filter subprograms and comments. Settings, functions and filters are described in detail in the later sections of this Manual.
  • Page 16 A filter consists of a header, which begins with the keyword match() with parameters defining the incoming CAN frames "match criteria" followed by a data processing subprogram in specially created programming language. The order of the filters is significant. Device will match received messages against the filters in an exact same order they are specified in the program.
  • Page 17: Description Of The Settings

    VII. Description of the Settings Note that a vertical bar (pipe) is used in the descriptions below to separate alternative setting values. ON|OFF means, that the setting can have two different values — ON or OFF. 1. Forwarding of messages FW_CAN1_TO_CAN2=ON|OFF FW_CAN2_TO_CAN1=ON|OFF Sets the default forwarding rules —...
  • Page 18 NMEA 2000 Standard does not require a strict order of fast-packet frames on the bus. Device CAN controller has 3 "outboxes", thus fast-packet CAN frames can be put in different "outboxes" in the outgoing queue, this may lead to fast-packet frames to be sent out-of-order. Some NMEA 2000 equipment can not handle this situation well, in such cases use the following data flow control setting: STRICT_QUEUE=OFF|CAN1|CAN2|ON This setting forces strict order of outgoing fast-packet frames for CAN1, CAN2 or both interfaces (ON).
  • Page 19 The filter (first parameter) sets bits for the comparison with the message identifier and the mask (second parameter) indicates the bits whose comparison result is significant. ( 1 — corresponding by position bit of message CAN ID should match the bit set in filter exactly, 0 — can be any ). Thus, the system hardware filter passes only messages with the following PGNs: 0xE800 (ISO Acknowledgement), 0xEA00 (ISO Request), 0xEC00 (ISO Transport protocol), 0xEE00 (ISO Address Claim).
  • Page 20 5. Message slots initialization SLOTx=aabbccdd… or SLOTx=aa bb cc dd… x — slot number, 1 – 3; aabbccdd — sequence of bytes (1 – 229), hexadecimal values. Device has 3 buffers, called "SLOTS" which can be used as outgoing CAN frames templates or as a data storage buffers.
  • Page 21: Programming The Device

    VIII. Programming the Device We have created a special programming language for the Device similar to common scripting languages. There are number of limitations imposed by tasks and computing capabilities of the microcontroller. Program consists of ASCII text, each line is either a statement, comment or blank line. Each new statement must start on a new line.
  • Page 22 For example, this filter match(ANY, 0x00000000, 0x01FFF800) will match all 11-bit CAN frames (for all CAN IDs in range 0x000...0x7FF we will have a match — as all such IDs AND 0x01FFF800 expression yields 0) The keyword match() is not translated into bytecode, so the comparison of the specified filters with the messages received is very quick.
  • Page 23 By modifying the values in the buffer, the subprogram can modify messages and even create new messages. Regardless of the actual length of the received message, the subprogram has access to all 229 bytes of the buffer. Please note that if a NMEA 2000 fast-packet PGN is not included in the PGNS_TO_ASSEMBLY list, the program will be called for each CAN message in the sequence, and the byte at offset 4 will be set to 0xFF.
  • Page 24 • UINT32 — unsigned 4-byte integer; • FLOAT — 4-byte floating point number (IEEE 754-1985 single precision). When you turn on the Device, all variables are initialized to 0 type INT32. The following arithmetic, logical and binary operations are supported (listed in order of priority): •...
  • Page 25 5. Modification of the message buffer To modify a message in the buffer and read data from it, there are, respectively, two built-in functions set() and get(): set(expression1,type,expression2) [type] get(expression1, type) expression1 — expression converted to UINT8 type, offset of the first byte of data in the buffer; type —...
  • Page 26 if (expression1 operator expression2) { # do stuff else # do another stuff Example 2 above does not take into account that depth transducer can send special depth values 0xFFFFFFFF "not available", 0xFFFFFFFE "out of range" or 0xFFFFFFFD "reserved". Using if() operator we will check if the data value is within allowed range: Example 3.
  • Page 27 the loop. If maximum execution time is reached, Device produces "FUNC Execution timeout (3000 ms)" message in the TEXT diagnostics log. 7. Real time functions The majority of NMEA 2000 data items have a short life span. You need to track received data items timestamps to determine if data is still valid (e.g.
  • Page 28 Use when you need to change PGNs source device address and make them appear as if they were sent by the Bridge itself. Example 4. # Processing of Actual Pressure messages (PGN 0x1FD0A) and generation of the # Environmental Parameters messages (PGN 0x1FD06) match(CAN2,0x1FD0A00,0x1FFFF00) send() # Forward the original message...
  • Page 29 10. Program initialization Like filters, the initialization section is defined by the keyword init() with no parameters, after which its subprogram follows in curly brackets: init() The init() function can be used to initialize program variables. Its subprogram code will be executed on Device power-up prior to any other code.
  • Page 30 Example 5. # Fibonacci Sequences Generator DIAGNOSTICS=45 # record first 45 numbers init(){ # set two first numbers in Fibonacci sequence A=cast(0,UINT32) # F0 B=cast(1,UINT32) # F1 # calculate next Fibonacci number and write it to log file func(){ C = A + B # F(n) = F(n-1) + F(n-2) log(C) # write F(n) to log file...
  • Page 31 13. Math functions and constants Floating point constants: High precision floating point constants: M_PI = π = 3.14159... M_180P = 180 / π M_2PI = 2 * π M_1800P = M_180P / 10 M_PI2 = π / 2 M_P180 = π / 180 Trigonometric functions: FLOAT sin(x) FLOAT cos(x)
  • Page 32 15. Passing parameters to program in real time UINT8 param(slot) Function param() can handle special "YD:PARAM" command entered into the Bridge's "Installation Description String 2" (PGN 126998) via NMEA 2000-to-PC gateway. This might come handy when you need to adjust some program parameters and observe response in real time, for example, when adjusting PID values on a CAN Servo.
  • Page 33 payload. To get payload bytes just load() this SLOT to copy contents into work buffer. SLOT can hold up to 229 bytes but this configuration method allows you to set only the first 30 bytes; all other bytes in the SLOT will be cleared.
  • Page 34: Optimization And Performance

    IX. Optimization and Performance The transfer time of a typical CAN single-frame with a full payload length of 8 bytes is about 520 microseconds. Device does not waste any CPU resources handling CAN bus data link layer communications, those are offloaded to CAN controller hardware. Delay between message reception and transmission —...
  • Page 35 Thanks to the system hardware filters (see VII.3), messages which are required for the normal operation of the NMEA 2000 network (ISO Acknowledgement, ISO Request, ISO Address Claim) will be forwarded between CAN1 and CAN2 interfaces unmodified. In this program a hardware filter for CAN2 interface is not defined, so Device will add a default filter 1 to accept all messages from CAN2 and pass them to filters for further processing (see VII.3).
  • Page 36 Example 8.b (correct) match(CAN1,0x1FD0A10,0x1FFFFFF) # "Actual Pressure" PGN from 0x10 address? # process data 3. Use optimizations instead of relying on a compiler Current version of Device compiler can not optimize expressions. For example, in this code: A = time() # get device uptime in ms B = A / ( 60 * 1000 ) # convert to minutes...
  • Page 37 Example 9. PGNS_TO_ASSEMBLY=0x1F513 match(CAN1,0x1F51300,0x1FFFF00) set(DATA+6, UINT32, get(DATA+6,UINT32) — 1852000) # 1000 nm off send() Example 10. match(CAN1, 0x1F51300,0x1FFFF00) if (get(DATA,UINT8) & 0x1F == 1) # 2-nd message in a sequence? set(DATA+1, UINT32, get(DATA+1,UINT32) – 1852000) # 1000 nm off send() Net result of both programs will be the same, but in Example 10 the match() subprogram will be executed 3 times for each PGN 0x1F513, as this PGN is sent in a succession of 3 fast-packet frames.
  • Page 38: Debug And Logging Functionality

    X. Debug and logging functionality Debug mode is not a normal operation mode of the Device. The recording of debug data can lead to additional message delay and loss of some CAN bus messages. Device supports both raw CAN bus data and program runtime debug information recordings. To start recording add the following setting to YDNB.CFG file: DIAGNOSTICS=x Where x is log recording duration in seconds.
  • Page 39 00:30.310 RX CAN1 FILTER 01, 0x09FD0205 1A1A018544FAFFFF 00:30.310 LG CAN1 FILTER 01, INT32 19400 00:30.310 TX CAN2 FILTER 01, 0x09FD0205 1A1A018544FAFFF 00:30.319 !! FUNC Execution timeout (3000 ms) "RX" and "TX" records designate received and sent CAN frames followed by indication of interface, number of the filter which had a match and CAN frame ID and payload.
  • Page 40: Firmware Updates

    XI. Firmware Updates To update the Device firmware, download .ZIP archive from our site and extract BUPDATE.BIN file, take a microSD card formatted with FAT or FAT32 file system, copy BUPDATE.BIN file to the card root folder, power down NMEA 2000, insert card into Device, power up NMEA 2000. From 5-15 seconds after powering on, the LED will flash 5 times with green light.
  • Page 41: Program Protection And Encryption

    If the Device already is using the given version of the firmware, or if the Device cannot open the file or the file is corrupted, the boot loader immediately transfers control to the main program. This is done without visual cues. The Device information including the firmware version is displayed in the list of NMEA 2000 devices (SeaTalk NG, SimNet, Furuno CAN) or in the common list of external devices on the chart plotter (see third line at Figure 4).
  • Page 42: Appendix A. Troubleshooting

    Appendix A. Troubleshooting Situation Possible cause and correction 1. CAN1 interface is not powered. Device CPU is powered from CAN1 No LED indication on the Device interface. Make sure that power source rails are connected to CAN1 interface. 2. No power supply on the bus. Check if the bus power is supplied (NMEA 2000 network requires a separate power connection and cannot be powered by a plotter or another device connected to the network).
  • Page 43 Table continued Situation Possible cause and correction There are problems in the NMEA 2000 network. The network segment Device is not visible is not connected to the plotter or there are missing terminators in the network in the NMEA 2000 or the network is too long.
  • Page 44: Appendix B. List Of Nmea 2000 Messages Of The Device

    Appendix B. List of NMEA 2000 Messages of the Device PGNs from the table below are received and sent by the Device independently from any settings, hardware filters (see VII.3) or the program. All received messages, including the messages that are addressed to the Device, are transmitted to the program and may be forwarded to another CAN interface by it.
  • Page 45: Appendix C. Device Connectors

    Appendix C. Device Connectors Figure 1. NMEA 2000 connectors of the YDNB-07R (left) and YDNB-07N (right) models — 45 —...

This manual is also suitable for:

Ydnb-07r

Table of Contents