Link G4X - Can An input not holding value

Evening everyone,

Pposting here for some help / advise.

I’ve managed to setup some can di button switches to turn functions on and off but im having trouble with sending through virtual rotary encoder values (1,2,3,4,5 etc) to a can an input.

My dashboard is setup to use two buttons that toggle a value up/down (storing it in a dummy value slot).

I then have a button that is used to ‘set’ that value. My XML looks like this:

  <frame id="1005" writeInterval="100">
      <value name="Send to Link: Log Marker" length="1" units="bit"></value>
      <value name="Send to Link: Launch Toggle" length="1" units="bit" offset="1"></value>
      <value name="Send to Link: Flat Foot Toggle" length="1" units="bit" offset="2"></value>
    </frame>
     <frame id="1006" writeInterval="100">
      <value name="Link: Launch CAN AN 16 Output" length="2"> </value> <!-- GP Rotary output -->
      <!--value name="Link: Launch RPM Value" length="2" offset="2" enum="0:4000,1:4500,2:5000,3:5500,4:6000,5:6500,#:err"></value--> 
    </frame>

CAN AN16 Output is sending its value across to my ecu (1 is being sent as 256, 2 as 512 etc). And I see this value reflected on the an16 input link side, but, its only set for a second or so before defaulting back to 0.0.

Here is how the can frame to receive the data looks like:

Am I missing something here? Perhaps in my XML config or dashboard setup?

Thanks in advance for the help.
-Alex

if you sending the frame via button you don’t need that part
also the name is confused

Thanks for the suggestions, I did try removing the write interval but didnt see a differece in behaviour (I previously had it set to just be sent at intervals with the rotary buttons changing the value).

 <frame id="1006">
      <value name="Send to Link: Launch RPM Set" length="2"> </value>
      <!--value name="Link: Launch RPM Value" length="2" offset="2" enum="0:4000,1:4500,2:5000,3:5500,4:6000,5:6500,#:err"></value--> 
    </frame>

Have ammended to this. But still experiencing the same issue.

can you explain more
the buttons are in realdash?
you want to send a command to G4X?

Sure thing.

So heres an image of the dash.

Dash

Launch +/- adjust the dummy value I have stored (see debug numbers bottom right of dash) through the range of 1-5.

The ‘set launch’ button takes this value (id93) and sets:

“Send to Link: Launch RPM Set”.

This is then received by link as can an16 with the config as shown a couple posts up…

The workflow works, and the value gets set albeit briefly, before reverting back to ‘0.0’ inside of link (the dummy value stays as it was set in realdash and if i I toggle the value up/down and hit set, I see the value update in link, before going back to 0.0 again).

Does that make sense? Its the persistence of the value I am having issues with.

ok: RPM+ is seeding a frame 0x000003ED:0x00 0x00…
same as RPM- from realdash then it should get the value back on the same frame
i don’t see it in your xml in your xml you have 2 frames 4 value
im missing what are the buttons doings
now i see SET is sending the command on frame 1006

>  <frame id="1005" writeInterval="100">


>       <value name="Send to Link: Log Marker" length="1" units="bit"></value>
>       <value name="Send to Link: Launch Toggle" length="1" units="bit" offset="1"></value>
>       <value name="Send to Link: Flat Foot Toggle" length="1" units="bit" offset="2"></value>
>     </frame>
>      <frame id="1006">
>       <value name="Link: Launch CAN AN 16 Output" length="2"> </value> <!-- GP Rotary output -->
>       <!--value name="Link: Launch RPM Value" length="2" offset="2" enum="0:4000,1:4500,2:5000,3:5500,4:6000,5:6500,#:err"></value--> 
>     </frame>

The +/- buttons are just doing this:

Launch decrease action does the opposite (rotates the value down).

And here is the action that triggers on a click of ‘Set’.

open can monitor and see if you getting frame 0x000003ED & 0x000003EE

select input should be Link: Launch CAN AN 16 Output because that the name you give in xml

I adjusted the name earlier to make it clearer.

I see the can frames making its way through to link (showing its leaving realdash ok). Its just that the value doesnt stay at what it is set, its being set back to 0.0 for some reason.

thank you for the help.

Only thing that comes to mind is a logical error on the triggers/actions on the dash. Some other trigger is pulling the value back to 0.

Hi, I’m tring similler setup. I found descliption about it in the Link g4x help file. It says “When a CAN Analog has been written to since power up but hasn’t been updated in at least the last 2 seconds it’s value is set to 0.”
I think realdash will send message just when value was changed, so value will be back to 0. Can realdash send same value continuously?

Yeah, I figured this out in the end. You can use write interval to send the value at set intervals.

Believe I set it to 50 for the rotary encoder inputs on a can an and that’s stopped it from failing :+1:t2:

Thank you. I tried with writeInterval=“100”, and it worked well for CAN digital input and CAN analog input. Values are stable.

Do you monitor Can input status in Runtime Values list (shortcut F12) in PCLink software? With this monitor, you can check CAN status for each channel.