NMEA Fast Packet receive not displaying properly

Discuss issues and ideas you have to configuring displays with PowerVision
JZanni
Posts: 29
Joined: Tue Oct 12, 2010 3:09 pm

NMEA Fast Packet receive not displaying properly

Post by JZanni » Mon Nov 29, 2010 6:29 pm

I have to read a faspacket from a NMEA device. The Packet has a total of 15 bytes. I did create the packet for PGN130817 and read the data in bytes due to the limitation of the field size reported in previous topic (see viewtopic.php?f=7&t=79&start=0).
Below is an example of the message received as recorded by our CanTrace (Line 204 to 206) 3 packets of 8 bytes):
  • 204) 4391.3 Rx 19FF0101 8 00 0F 32 99 00 F1 00 00
    205) 4391.9 Rx 19FF0101 8 01 1D 1B 00 EA 04 00 00
    206) 4392.4 Rx 19FF0101 8 02 3D 07 FF FF FF FF FF
Copy of the code, Canbus trace and the PGN structure are attached.
My problems are:
1) Byte 1(0x32) and Byte 2(0x99). The display(transmission page) show a value of 0 for both. Instead of 50 and 153 as expected. Data is being displayed in Black saying tha valid data has been received. :(
2) Byte 3 - Device type read 0 but network value is 0 so may be OK. :|
3) Byte 4 - First 4 bits- Device Placement displays 0 instead of 1 :(
4) Byte 5&6 - Alarm status display 0 as expected. :|
5) Byte 7 and 8: Motor and Controller temp are properly read and displayed :mrgreen:
4) Byte 9 - remaining capacity: Display 0 same as data received :|
5) Byte 10&11 - Motor Volt Display in read as invalid data. :cry: This does not change no matter what format, scaling I use. Data sent 0xEA 0x04 does translate as 1258 or 12.58V as expected.
6) Byte 12&13 - Motor speed show 0 as sent :|
7) Byte 14&15 - Motor current Display proper value 185.3A 0x07 0x3D :mrgreen:

In short I am not sure what is going on
Byte 1&2, 4, 10&11 are definitively not working while
Byte 7,8, 14&15 are working.
I cannot prove or disprove the other bytes.
Am I doing something wrong or is there a bug?
Attachments
Regen2_2+Bow Thruster.zip
(4.19 MiB) Downloaded 11 times
dwills
Enovation Controls Development
Enovation Controls Development
Posts: 26
Joined: Fri Jul 30, 2010 8:27 am

Re: NMEA Fast Packet receive not displaying properly

Post by dwills » Tue Nov 30, 2010 8:35 pm

The resolution on most of the parameters that you entered for this PGN are set to 0. The resolution and offset are used for scaling the value in the CAN message. The value is multiplied by the resolution and then the offset is added. A zero resolution will always yield a zero result. A good rule of thumb for raw units is to use 1 for resolution and 0 for offset. If other units are used, the device documentation or standard has to be consulted to see how the message is being sent.

I think that this will fix your problem, if not post back here and I'll look into some more.
JZanni
Posts: 29
Joined: Tue Oct 12, 2010 3:09 pm

Re: NMEA Fast Packet receive not displaying properly

Post by JZanni » Wed Dec 01, 2010 11:21 am

Sorry for missing the obvious :oops: . Thank you very much :D .
May be in the next release, the default value when you add a variable could be set to 0 and 1 for Offset and Resolution.
As far as the Voltage issue it was because Min and Max were swapped. This is also one where the order of the column could be reversed. I must admit I had to correct most of my entries as I tend to think min/max and the low should be to the left or the high. May be this is only me :mrgreen: .
jpratt
Enovation Controls Development
Enovation Controls Development
Posts: 222
Joined: Mon Jun 21, 2010 11:18 am

Re: NMEA Fast Packet receive not displaying properly

Post by jpratt » Thu Dec 02, 2010 7:46 am

Smaller values make sense on the left to me. I think they may have just got switched during some refactoring. I will get this fixed up in 2.2 as well as adding default values for Offset and Resolution.
Jake Pratt
Software Development Manager