Can not Span multipal bytes in incremants for can messages

jclark
Posts: 6
Joined: Fri Sep 12, 2014 9:50 am

Can not Span multipal bytes in incremants for can messages

Post by jclark » Wed Mar 18, 2015 4:26 pm

PowerVision V 2.7.10475
PV450
Windows 7

When trying to set up joysticks using PGN 64982 using SPNs, 2675, 2670, 2665, 2660, 2676, 2671, 2666, 2661, I could not directly program or receive this message with the PowerVision Tools because there is a 10 bit variable and three 2 bit variables spanning 2 bytes. I tried both Freform and Library message programming. Below is an excerpt from J1939-71 for BJM1, Thanks

PGN 64982 Basic Joystick Message 1 - BJM1
Used to transfer information about the measured status of the 1st 2 axes and up to 12 buttons of a joystick. Additional
handle information is available in the Expanded Joystick Message.
10-bit position parameters are broadcast over 2 bytes. The eight most significant bits are transmitted in the second byte,
with the most significant bit at bit 8. The two least significant bits are transmitted in the first byte in bit positions 7 and
8, with the most significant of the two bits at bit 8.
10-bit position SPN Location in PGN
Bit 10 Byte n Bit 8
Bit 9 Bit 7
Bit 8 Bit 6
Bit 7 Bit 5
Bit 6 Bit 4
Bit 5 Bit 3
Bit 4 Bit 2
Bit 3 Bit 1
Bit 2 Byte (n-1) Bit 8
Bit 1 Bit 7

Transmission Repetition 100 ms or on change, not to exceed 20 ms
Data Length: 8
Data Page: 0
PDU Format: 253
PDU Specific: 214 PGN Supporting Information:
Default Priority: 3
Parameter Group Number: 64982 (0xFDD6)
Start Position Length Parameter Name SPN
1.1 2 bits Joystick 1 X-Axis Neutral Position Status 2675
1.3 2 bits Joystick 1 X-Axis Lever Left Negative Position Status 2670
1.5 2 bits Joystick 1 X-Axis Lever Right Positive Position Status 2665
1.7-2 10 bits Joystick 1 X-Axis Position 2660
3.1 2 bits Joystick 1 Y-Axis Neutral Position Status 2676
3.3 2 bits Joystick 1 Y-Axis Lever Back Negative Position Status 2671
3.5 2 bits Joystick 1 Y-Axis Lever Forward Positive Position Status 2666
3.7-4 10 bits Joystick 1 Y-Axis Position 2661
5.5 2 bits Joystick 1 Y-Axis Detent Position Status 2681
5.7 2 bits Joystick 1 X-Axis Detent Position Status 2680
6.1 2 bits Joystick 1 Button 4 Pressed Status 2688
6.3 2 bits Joystick 1 Button 3 Pressed Status 2687
6.5 2 bits Joystick 1 Button 2 Pressed Status 2686
6.7 2 bits Joystick 1 Button 1 Pressed Status 2685
7.1 2 bits Joystick 1 Button 8 Pressed Status 2692
7.3 2 bits Joystick 1 Button 7 Pressed Status 2691
7.5 2 bits Joystick 1 Button 6 Pressed Status 2690
7.7 2 bits Joystick 1 Button 5 Pressed Status 2689
8.1 2 bits Joystick 1 Button 12 Pressed Status 2696
8.3 2 bits Joystick 1 Button 11 Pressed Status 2695
8.5 2 bits Joystick 1 Button 10 Pressed Status 2694
8.7 2 bits Joystick 1 Button 9 Pressed Status 2693
J. Clark
High Country Tek
530-264-4189
ksaenz
Enovation Controls Development
Enovation Controls Development
Posts: 263
Joined: Thu Aug 19, 2010 7:53 am

Re: Can not Span multipal bytes in incremants for can messag

Post by ksaenz » Thu Mar 19, 2015 7:57 am

Hi jclark,

I've run into the same issue with the joystick message and other 10-bit parameters.

What I did with the joystick message was to only read the 8 most significant bits ( byte 2 for X-Axis and 4 for Y-Axis ) and change the resolution to 0.4 %/bit and that worked well enough for my needs.

For the other 10-bit messages I defined the 8 msbs and 2 lsbs separaterly and combined them before using them:

Code: Select all

my10bitVar = ( my8msbs * 4 ) + my2lsbs
It would be better if we could just define the 10-bit parameters but hopefully this helps.

Regards,
ksaenz
jclark
Posts: 6
Joined: Fri Sep 12, 2014 9:50 am

Re: Can not Span multipal bytes in incremants for can messag

Post by jclark » Thu Mar 19, 2015 9:58 am

Thanks,
That is easy enough, hopefully in the future we will be able to define 10 bit messages directly.
J. Clark
High Country Tek
530-264-4189
kgrover
Posts: 2
Joined: Wed Jun 07, 2017 3:41 pm

Re: Can not Span multipal bytes in incremants for can messages

Post by kgrover » Tue Dec 05, 2017 8:24 am

Has there been any updates to this to allow us to read messages that contain more then 8 bits? I'm currently trying to read joystick messages myself.
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: Can not Span multipal bytes in incremants for can messages

Post by boyce » Tue Dec 05, 2017 1:49 pm

The PGN/SPN definition method has not changed. But as indicated before, the 10 bit value can be calculated from the 2 bit fields.

Code: Select all

my10bitVar = ( my8msbs * 4 ) + my2lsbs
Boyce Schrack
Enovation Controls