Go Down

Topic: NMEA 2000 Shield (Read 205878 times) previous topic - next topic

mamasso30

Do you have any examples of how to use PGN 127489 with Arduino DUE? I read all the documentation, maybe I did not understand, but I only get the messages on the serial.


22:44:58.492 -> Start add 0
22:44:58.492 -> Initialize buffers
22:44:58.492 -> CAN device ready
22:44:58.679 -> Start address claim for device 0
22:45:07.684 -> PGN 127489, frame:3/4 send failed
22:45:08.688 -> PGN 127489, frame:0/4 send failed
22:45:09.696 -> PGN 127489, frame:0/4 send failed
22:45:10.704 -> PGN 127489, frame:0/4 send failed


Regards


Heading is on PGN 127250 and roll PGN 127257. So simply do not send heading message.

It is also possible to leave data out from message, which has multiple fields by defining it as NA. Then if there is e.g. two different devices sending engine data with PGN 127489, one can do
Code: [Select]
SetN2kEngineDynamicParam(N2kMsg,0,EngineOilPress,EngineOilTemp,N2kDoubleNA,N2kDoubleNA,N2kDoubleNA,N2kDoubleNA);
and other
Code: [Select]
SetN2kEngineDynamicParam(N2kMsg,0,N2kDoubleNA,N2kDoubleNA,EngineCoolantTemp,AltenatorVoltage,N2kDoubleNA,N2kDoubleNA);

The receiver should combine data right.

If there are really two devices sending heading, there should be way on receiver side to select, which one to use. Some MDF:s has that some does not. if you are making your own device, you should use my N2kDeviceList module and lock the device you want to follow to device "NAME" not source address, since that may change due to address claiming.

timolappalainen

When you get text "Send failed", it means that CAN controller can not send frames to bus. Most common reasons are:
1. Missing 120 ohm bus teminators.
2. Mixed CANL / CANH connection
3. Bad CAN connection
4. Wrong tranceiver connection on processor or controller.
5. Broken tranceiver

Hurde

#752
Jun 06, 2019, 05:43 pm Last Edit: Jun 06, 2019, 05:55 pm by Hurde
Hey folks,
i am probably one of the so many people trying to make their arduino work with the nmea2000.

my project wasn't that hard till now.

all i wanted to do was to control the simrad autopilot computer "AC12" and receive his rudder pos back.

but the system cant find the AC12 at all.

i use the actisense ngt-1 to look for devices and it does find the arduino a raymarine interface but not the simnet connected AC12....

could it be because of the diferences between Seatalk"NG" and simnet that the AC12 can not be seen?

does anyone have any experience with the simnet system at all?

rn what ever i do results in "Adress claim info - Failed" and it had to be something with the AC12

timolappalainen

Simnet, Seatalk NG and NMEA 2000 differs only in connectors. If you follow right NMEA 2000 cabling - totally 2 termination resistors on whole bus at longest end, all devices should see each other.

Where do you get "Adress claim info - Failed".

What NMEA 2000 library you use for Arduino?

Hurde

Simnet, Seatalk NG and NMEA 2000 differs only in connectors. If you follow right NMEA 2000 cabling - totally 2 termination resistors on whole bus at longest end, all devices should see each other.

Where do you get "Adress claim info - Failed".

What NMEA 2000 library you use for Arduino?
i use your library including the nmea2000_due library.
this works fine the ngt reads every pgn send by the arduino.
but when i connect the ac12 to the network it simply hangs.
maybe also the reason why i receive Adress claim info - Failed.
i receive the error in the actisense software.
but i am pretty sure that the cabling is correctly connected but who knows what swapping the wires does on the AC12

timolappalainen

I still expect there is some connection failure with AC12. Did you use Simnet-NMEA2000 adaptor cable? With that connection should be right. If not you have to find out CANH, CANL and power pins and connect them right to the bus. Note also that you should not have termination resistors on both simnet and NMEA2000 bus. When you connect them directly together, it is like one bus and must have totally two termination resistors.

Hurde

well,
There is one bus with both resistor terminator's

on this bus there is.
The power supply,
The Arduino,
The NGT-1
And the AC12
i replaced the AC12 with an Raymarine AXIOM mfd to check the bus and there is no problem as well.

could there be devices that need an specific pgn to reply on the bus? could there be someting like this?

seamaster

#757
Jun 08, 2019, 10:21 pm Last Edit: Jun 08, 2019, 10:22 pm by seamaster
Must me either your device ir the connection to it as I did have the AC12 box setup tring to do commissioning and initial setup on my test NMEA 2000 setup at home. I could see the device no problem what so ever

Hurde

well, then i might test the device for nmea 0183.
who knows what pops out.
or the device is simply broken.

scarlsen

Using the NMEA2000 for sensors and wind with great success.

The next project is to use the AIS function.
in PGN129794, what is the format for ETAdate and ETAtime ?

timolappalainen

In NMEA2000:
Date is 2 bytes days since 1970-01-01
Time is 4 bytes seconds since midnight resolution 0.0001 s

There seem to be parser for that PGN on my library.

Go Up