Coder Social home page Coder Social logo

suspected bug on ReadCV about ap_dcc_library HOT 22 OPEN

aikopras avatar aikopras commented on August 18, 2024
suspected bug on ReadCV

from ap_dcc_library.

Comments (22)

aikopras avatar aikopras commented on August 18, 2024

Hi Laurent

Strange. Let's try to find what causes the problem.
I've just tested it, and get a slightly different (=correct) behaviour.

Let's first explain my setup:

  • Arduino UNO + DCC shield (the one I've made at Easyeda / JLCPCB)
  • Lenz LZV 100 + LH 100 (I don't have a DR5000 or ESU Lockprogrammer).
  • CV_Access-Serial_Monitor test program (not modified!) uploaded to the UNO
  • DCC shield connected to the programming track
  • Since the original CV1 value was 1, I've first changed it to 3, to get identical results as in your test.

This is when I read CV1:

15:16:16.868 -> Reset Command
15:16:17.215 -> Service mode command:
15:16:17.215 -> Received CV Number: 1
15:16:17.215 -> Received CV Value: 224
15:16:17.249 -> Old CV value = 3
15:16:17.249 -> Bit Manupulation, Bitposition = 0, Bitvalue = 0
15:16:17.249 -> Verify Command. Bits are unequal
15:16:17.249 -> 
15:16:17.317 -> Service mode command:
15:16:17.317 -> Received CV Number: 1
15:16:17.317 -> Received CV Value: 225
15:16:17.317 -> Old CV value = 3
15:16:17.317 -> Bit Manupulation, Bitposition = 1, Bitvalue = 0
15:16:17.317 -> Verify Command. Bits are unequal
15:16:17.317 -> 
15:16:17.385 -> Service mode command:
15:16:17.385 -> Received CV Number: 1
15:16:17.385 -> Received CV Value: 226
15:16:17.385 -> Old CV value = 3
15:16:17.385 -> Bit Manupulation, Bitposition = 2, Bitvalue = 0
15:16:17.385 -> Verify Command. Bits are equal
15:16:17.385 -> 
15:16:17.452 -> Service mode command:
15:16:17.452 -> Received CV Number: 1
15:16:17.452 -> Received CV Value: 227
15:16:17.452 -> Old CV value = 3
15:16:17.452 -> Bit Manupulation, Bitposition = 3, Bitvalue = 0
15:16:17.452 -> Verify Command. Bits are equal
15:16:17.452 -> 
15:16:17.519 -> Service mode command:
15:16:17.519 -> Received CV Number: 1
15:16:17.519 -> Received CV Value: 228
15:16:17.519 -> Old CV value = 3
15:16:17.519 -> Bit Manupulation, Bitposition = 4, Bitvalue = 0
15:16:17.519 -> Verify Command. Bits are equal
15:16:17.519 -> 
15:16:17.590 -> Service mode command:
15:16:17.590 -> Received CV Number: 1
15:16:17.590 -> Received CV Value: 229
15:16:17.590 -> Old CV value = 3
15:16:17.590 -> Bit Manupulation, Bitposition = 5, Bitvalue = 0
15:16:17.590 -> Verify Command. Bits are equal
15:16:17.590 -> 
15:16:17.657 -> Service mode command:
15:16:17.657 -> Received CV Number: 1
15:16:17.657 -> Received CV Value: 230
15:16:17.657 -> Old CV value = 3
15:16:17.657 -> Bit Manupulation, Bitposition = 6, Bitvalue = 0
15:16:17.657 -> Verify Command. Bits are equal
15:16:17.691 -> 
15:16:17.759 -> Service mode command:
15:16:17.759 -> Received CV Number: 1
15:16:17.759 -> Received CV Value: 231
15:16:17.759 -> Old CV value = 3
15:16:17.759 -> Bit Manupulation, Bitposition = 7, Bitvalue = 0
15:16:17.759 -> Verify Command. Bits are equal
15:16:17.759 -> 
15:16:17.862 -> Service mode command:
15:16:17.862 -> Received CV Number: 1
15:16:17.862 -> Received CV Value: 3
15:16:17.862 -> Old CV value = 3
15:16:17.862 -> Verify Byte Command - Bytes are equal
15:16:17.862 -> 

What I remember (but it is a while ago when I wrote this code, so I don't recollect the details) is that after a write, eight individual Bit Verify Commands are send by the Command Station. That is indeed what we see with your output as well as mine. So that is OK.

If I look at the data, the values of bit positions 0 and 1 differ, while the values for the other bit positions are the same. Since a value 3 means that bits 0 and 1 have a value 1, this seems correct as well.

Don't get confused that for the bit manipulation / very commands you get back values between 224 and 231. See the explanation in Line 208 of the file sup_cv.cpp.

In fact your results and mine seem identical, till line 3 from the bottom. You get a CV value back of 255, while mine says the value is 3.

This difference is what puzzles me.
Is it correct that you are unable to do any successful Programming on the Programming Track?
And you have this with both the DR5000 as well as the ESU Lokprogrammer?
My first feeling is that there may be a difference in the way how the Lenz LZV100 and the DR5000 / ESU Lokprogrammer implements the last steps in SM programming.

The key seems to be the third line from the bottom. In your test you get back a CV Value of 255 (which is incorrect), but in my test I get back a value of 3 (which is correct). However, all the previous bit verify commands returned the correct value. Thus also your decoder should gave the right value for CV1 (=3).
Given that all the earlier bit tests showed that all bits have the correct value, why would your command stations subsequently send you a verify byte command with a value of 255 (instead of 3; the value that it has just assembled?)

I guess we have to both study a bit better how SM programming exactly works. :-(

Bye

Aiko

from ap_dcc_library.

aikopras avatar aikopras commented on August 18, 2024

I tried the two other Command Stations that I have to get a better understanding how these differ in operation.

This first check was with the Roco Multimaus in combination with 10764. Although this combination is able to write successfully CV values, it can not (according to the documentation) read/verify CV values. So that test didn't help.

The next test was the OpenDCC Command Station (that I have, but hardly use). Although that Command Station is able to read / verify CV values, the behaviour is completely different compared to Lenz. OpenDCC starts with checking CV8 (Vendor ID) and CV29 (Config). I don't no why, but that could probably have a good reason. So the first thing I had to do was to extend the Array with test CVs (from 10 CVs to 29 or more), since otherwise it wouldn't show any CV values.

After that I tried to read the value of CV1, but OpenDCC uses a slightly different setting than Lenz: where Lenz set the D-Value to 0, OpenDCC sets it to 1. OK, shouldn't be a problem.

However, for ALL the 8 bits being tested, OpenDCC says that the bits are unequal. That is, like with your command systems, an incorrect conclusion.

The weird thing is that your Command Stations, like the OpenDCC station, never see that two bits are equal. That may also lead to a different conclusion: these command stations do not recognise the ACK signal. Maybe therefore it is a timing issue of the ACK signal. Something Lenz doesn't seem to care, but the others do.
Just a guess.

Aiko

from ap_dcc_library.

aikopras avatar aikopras commented on August 18, 2024

Just to be complete: this is the trace while using the OpenDCC Command System.
''''
Service mode command:
17:28:18.644 -> Received CV Number: 8
17:28:18.644 -> Received CV Value: 239
17:28:18.644 -> Old CV value = 8
17:28:18.644 -> Bit Manupulation, Bitposition = 7, Bitvalue = 8
17:28:18.678 -> Verify Command. Bits are unequal
17:28:18.678 ->
17:28:18.819 -> Service mode command:
17:28:18.819 -> Received CV Number: 8
17:28:18.819 -> Received CV Value: 231
17:28:18.819 -> Old CV value = 8
17:28:18.819 -> Bit Manupulation, Bitposition = 7, Bitvalue = 0
17:28:18.819 -> Verify Command. Bits are equal
17:28:18.819 ->
17:28:18.927 -> Service mode command:
17:28:18.927 -> Received CV Number: 1
17:28:18.927 -> Received CV Value: 232
17:28:18.927 -> Old CV value = 3
17:28:18.927 -> Bit Manupulation, Bitposition = 0, Bitvalue = 8
17:28:18.927 -> Verify Command. Bits are unequal
17:28:18.927 ->
17:28:19.066 -> Service mode command:
17:28:19.066 -> Received CV Number: 1
17:28:19.066 -> Received CV Value: 233
17:28:19.066 -> Old CV value = 3
17:28:19.066 -> Bit Manupulation, Bitposition = 1, Bitvalue = 8
17:28:19.102 -> Verify Command. Bits are unequal
17:28:19.102 ->
17:28:19.207 -> Service mode command:
17:28:19.243 -> Received CV Number: 1
17:28:19.243 -> Received CV Value: 234
17:28:19.243 -> Old CV value = 3
17:28:19.243 -> Bit Manupulation, Bitposition = 2, Bitvalue = 8
17:28:19.243 -> Verify Command. Bits are unequal
17:28:19.243 ->
17:28:19.385 -> Service mode command:
17:28:19.385 -> Received CV Number: 1
17:28:19.385 -> Received CV Value: 235
17:28:19.385 -> Old CV value = 3
17:28:19.385 -> Bit Manupulation, Bitposition = 3, Bitvalue = 8
17:28:19.385 -> Verify Command. Bits are unequal
17:28:19.385 ->
17:28:19.524 -> Service mode command:
17:28:19.524 -> Received CV Number: 1
17:28:19.524 -> Received CV Value: 236
17:28:19.524 -> Old CV value = 3
17:28:19.524 -> Bit Manupulation, Bitposition = 4, Bitvalue = 8
17:28:19.524 -> Verify Command. Bits are unequal
17:28:19.524 ->
17:28:19.663 -> Service mode command:
17:28:19.663 -> Received CV Number: 1
17:28:19.663 -> Received CV Value: 237
17:28:19.663 -> Old CV value = 3
17:28:19.700 -> Bit Manupulation, Bitposition = 5, Bitvalue = 8
17:28:19.700 -> Verify Command. Bits are unequal
17:28:19.700 ->
17:28:19.804 -> Service mode command:
17:28:19.838 -> Received CV Number: 1
17:28:19.838 -> Received CV Value: 238
17:28:19.838 -> Old CV value = 3
17:28:19.838 -> Bit Manupulation, Bitposition = 6, Bitvalue = 8
17:28:19.838 -> Verify Command. Bits are unequal
17:28:19.838 ->
17:28:19.976 -> Service mode command:
17:28:19.976 -> Received CV Number: 1
17:28:19.976 -> Received CV Value: 239
17:28:19.976 -> Old CV value = 3
17:28:19.976 -> Bit Manupulation, Bitposition = 7, Bitvalue = 8
17:28:19.976 -> Verify Command. Bits are unequal
17:28:19.976 ->
17:28:20.113 -> Service mode command:
17:28:20.113 -> Received CV Number: 1
17:28:20.113 -> Received CV Value: 0
17:28:20.113 -> Old CV value = 3
17:28:20.113 -> Verify Byte Command - Bytes are unequal
17:28:20.113 ->
''''

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Dear Aiko

After checking connexion to avoid any troubel i made some new tests.
This is the test conditions:

UNO +serial CV code ( dcc_pin =2 ack_pin =3) no other change.

1st test with:
Arduino NANO EVERY with DCC decoder test code ( ok for managing outputs with Fx functions)
Code is managed by AP DCC Lib :) bas on change on F0 Fx change to drive output states Really basic mode.

Ack is driving a MOSFET N channel with in drain side a 200r resistor CV to permit from Vin ( after a diode bridge from DCC to have the requeted 60ma load.)

Dcc in work like a charme :) : every instruction is execute as soon as F0 Fx function number is change on desired decoder adress ( fast diode schottky + resistor divider (10K+10K) +mosfet n channel) Pull up on drain with 5V and go to dcc_in pin.) ( it s like the usual the famous 6N137 opto coupler)

uint32_t FN_STATE =0;
uint8_t NB_CHANNELS =28;
uint8_t TMP_FXFY get the value from locoCmd.FXFY updates;

LOCO address is defined by CV29 = 32 : long function decoder with long adress so CV17 = 192 + CV18= 200 ( for test)
CV1 keep 3

test read adress from DR5000 get this result:

:22:11.165 -> Test DCC lib - CV Access Cmd
22:22:21.711 -> Reset Command
22:22:21.805 -> Service mode command:
22:22:21.805 -> Rcv CV Nbr: 29
22:22:21.805 -> Rcv CV Val: 239
22:22:21.805 -> 
22:22:22.008 -> Service mode command:
22:22:22.008 -> Rcv CV Nbr: 29
22:22:22.008 -> Rcv CV Val: 238
22:22:22.008 -> 
22:22:22.149 -> Service mode command:
22:22:22.149 -> Rcv CV Nbr: 29
22:22:22.149 -> Rcv CV Val: 237
22:22:22.149 -> 
22:22:22.290 -> Service mode command:
22:22:22.290 -> Rcv CV Nbr: 29
22:22:22.290 -> Rcv CV Val: 236
22:22:22.290 -> 
22:22:22.478 -> Service mode command:
22:22:22.478 -> Rcv CV Nbr: 29
22:22:22.524 -> Rcv CV Val: 235
22:22:22.524 -> 
22:22:22.665 -> Service mode command:
22:22:22.665 -> Rcv CV Nbr: 29
22:22:22.665 -> Rcv CV Val: 234
22:22:22.665 -> 
22:22:22.837 -> Service mode command:
22:22:22.837 -> Rcv CV Nbr: 29
22:22:22.837 -> Rcv CV Val: 233
22:22:22.837 -> 
22:22:23.149 -> Service mode command:
22:22:23.149 -> Rcv CV Nbr: 29
22:22:23.149 -> Rcv CV Val: 235
22:22:23.149 -> 
22:22:23.462 -> Service mode command:
22:22:23.462 -> Rcv CV Nbr: 17
22:22:23.462 -> Rcv CV Val: 239
22:22:23.462 -> 
22:22:23.743 -> Service mode command:
22:22:23.743 -> Rcv CV Nbr: 17
22:22:23.790 -> Rcv CV Val: 237
22:22:23.790 -> 
22:22:23.931 -> Service mode command:
22:22:23.931 -> Rcv CV Nbr: 17
22:22:23.931 -> Rcv CV Val: 236
22:22:23.931 -> 
22:22:24.129 -> Service mode command:
22:22:24.129 -> Rcv CV Nbr: 17
22:22:24.129 -> Rcv CV Val: 235
22:22:24.129 -> 
22:22:24.269 -> Service mode command:
22:22:24.269 -> Rcv CV Nbr: 17
22:22:24.269 -> Rcv CV Val: 234
22:22:24.269 -> 
22:22:24.457 -> Service mode command:
22:22:24.457 -> Rcv CV Nbr: 17
22:22:24.457 -> Rcv CV Val: 233
22:22:24.457 -> 
22:22:24.644 -> Service mode command:
22:22:24.644 -> Rcv CV Nbr: 17
22:22:24.644 -> Rcv CV Val: 232
22:22:24.644 -> 
22:22:24.832 -> Service mode command:
22:22:24.832 -> Rcv CV Nbr: 17
22:22:24.832 -> Rcv CV Val: 233
22:22:24.832 -> 
22:22:25.066 -> Service mode command:
22:22:25.066 -> Rcv CV Nbr: 18
22:22:25.066 -> Rcv CV Val: 239
22:22:25.066 -> 
22:22:25.223 -> Service mode command:
22:22:25.223 -> Rcv CV Nbr: 18
22:22:25.223 -> Rcv CV Val: 238
22:22:25.223 -> 
22:22:25.394 -> Service mode command:
22:22:25.394 -> Rcv CV Nbr: 18
22:22:25.394 -> Rcv CV Val: 237
22:22:25.394 -> 
22:22:25.644 -> Service mode command:
22:22:25.644 -> Rcv CV Nbr: 18
22:22:25.644 -> Rcv CV Val: 236
22:22:25.644 -> 
22:22:25.785 -> Service mode command:
22:22:25.785 -> Rcv CV Nbr: 18
22:22:25.785 -> Rcv CV Val: 235
22:22:25.785 -> 
22:22:25.973 -> Service mode command:
22:22:25.973 -> Rcv CV Nbr: 18
22:22:25.973 -> Rcv CV Val: 234
22:22:25.973 -> 
22:22:26.160 -> Service mode command:
22:22:26.160 -> Rcv CV Nbr: 18
22:22:26.160 -> Rcv CV Val: 233
22:22:26.160 -> 
22:22:26.301 -> Service mode command:
22:22:26.301 -> Rcv CV Nbr: 18
22:22:26.301 -> Rcv CV Val: 232
22:22:26.301 -> 
22:22:26.489 -> Service mode command:
22:22:26.489 -> Rcv CV Nbr: 18
22:22:26.489 -> Rcv CV Val: 223
22:22:26.489 -> 
void UPDATE_FN_STATE()	 
{
	if (bitRead(TMP_F0F4,4) == 1)
	{
		if(bitRead(LAST_FN_STATE,0) !=0) 
		{
			FN_STATE = LAST_FN_STATE;
		} 

		//UPDATE FN_STATE FOR F0-F4
		bitWrite(FN_STATE,0, bitRead(TMP_F0F4,4));
		bitWrite(FN_STATE,1, bitRead(TMP_F0F4,0));
		bitWrite(FN_STATE,2, bitRead(TMP_F0F4,1));
		bitWrite(FN_STATE,3, bitRead(TMP_F0F4,2));
		bitWrite(FN_STATE,4, bitRead(TMP_F0F4,3));

		//UPDATE FN_STATE FOR F5-F8
		bitWrite(FN_STATE,5, bitRead(TMP_F5F8,0));
		bitWrite(FN_STATE,6, bitRead(TMP_F5F8,1));
		bitWrite(FN_STATE,7, bitRead(TMP_F5F8,2));
		bitWrite(FN_STATE,8, bitRead(TMP_F5F8,3));	

		//UPDATE FN_STATE FOR F9F12
		bitWrite(FN_STATE,9, bitRead(TMP_F9F12,0));
		bitWrite(FN_STATE,10, bitRead(TMP_F9F12,1));
		bitWrite(FN_STATE,11, bitRead(TMP_F9F12,2));
		bitWrite(FN_STATE,12, bitRead(TMP_F9F12,3));				

		//UPDATE FN_STATE FOR F13F20
		bitWrite(FN_STATE,13, bitRead(TMP_F13F20,0));
		bitWrite(FN_STATE,14, bitRead(TMP_F13F20,1));
		bitWrite(FN_STATE,15, bitRead(TMP_F13F20,2));
		bitWrite(FN_STATE,16, bitRead(TMP_F13F20,3));
		bitWrite(FN_STATE,17, bitRead(TMP_F13F20,4));
		bitWrite(FN_STATE,18, bitRead(TMP_F13F20,5));
		bitWrite(FN_STATE,19, bitRead(TMP_F13F20,6));
		bitWrite(FN_STATE,20, bitRead(TMP_F13F20,7));

		//UPDATE FN_STATE FOR F21F28
		bitWrite(FN_STATE,21, bitRead(TMP_F21F28,0));
		bitWrite(FN_STATE,22, bitRead(TMP_F21F28,1));
		bitWrite(FN_STATE,23, bitRead(TMP_F21F28,2));
		bitWrite(FN_STATE,24, bitRead(TMP_F21F28,3));
		bitWrite(FN_STATE,25, bitRead(TMP_F21F28,4));
		bitWrite(FN_STATE,26, bitRead(TMP_F21F28,5));
		bitWrite(FN_STATE,27, bitRead(TMP_F21F28,6));
		bitWrite(FN_STATE,28, bitRead(TMP_F21F28,7));

		bitSet(FN_STATE,29);
		bitSet(FN_STATE,30);
		bitSet(FN_STATE,31);			
				
	}
	else
	{
		FN_STATE = 0b11100000000000000000000000000000;
	}
	
}

F0 is a global ON OFF switch

After that we drive outputs with:

void UPDATE_OUTPUTS()
{
  for (uint8_t i = 0; i < NB_CHANNELS; i++) //28
  {
    if (bitRead(FN_STATE, i) == 1)
    {
      digitalWrite(LED_PINS[i], LOW);    //TO LIGHT ON
    }
    else
    {
      digitalWrite(LED_PINS[i], HIGH); //TO LIGHT OFF
    }
  }

}
```
Everything is ok.

So now trying to read CV

`
```
:22:11.165 -> Test DCC lib - CV Access Cmd
22:22:21.711 -> Reset Command
22:22:21.805 -> Service mode command:
22:22:21.805 -> Rcv CV Nbr: 29
22:22:21.805 -> Rcv CV Val: 239
22:22:21.805 -> 
22:22:22.008 -> Service mode command:
22:22:22.008 -> Rcv CV Nbr: 29
22:22:22.008 -> Rcv CV Val: 238
22:22:22.008 -> 
22:22:22.149 -> Service mode command:
22:22:22.149 -> Rcv CV Nbr: 29
22:22:22.149 -> Rcv CV Val: 237
22:22:22.149 -> 
22:22:22.290 -> Service mode command:
22:22:22.290 -> Rcv CV Nbr: 29
22:22:22.290 -> Rcv CV Val: 236
22:22:22.290 -> 
22:22:22.478 -> Service mode command:
22:22:22.478 -> Rcv CV Nbr: 29
22:22:22.524 -> Rcv CV Val: 235
22:22:22.524 -> 
22:22:22.665 -> Service mode command:
22:22:22.665 -> Rcv CV Nbr: 29
22:22:22.665 -> Rcv CV Val: 234
22:22:22.665 -> 
22:22:22.837 -> Service mode command:
22:22:22.837 -> Rcv CV Nbr: 29
22:22:22.837 -> Rcv CV Val: 233
22:22:22.837 -> 
22:22:23.149 -> Service mode command:
22:22:23.149 -> Rcv CV Nbr: 29
22:22:23.149 -> Rcv CV Val: 235
22:22:23.149 -> 
22:22:23.462 -> Service mode command:
22:22:23.462 -> Rcv CV Nbr: 17
22:22:23.462 -> Rcv CV Val: 239
22:22:23.462 -> 
22:22:23.743 -> Service mode command:
22:22:23.743 -> Rcv CV Nbr: 17
22:22:23.790 -> Rcv CV Val: 237
22:22:23.790 -> 
22:22:23.931 -> Service mode command:
22:22:23.931 -> Rcv CV Nbr: 17
22:22:23.931 -> Rcv CV Val: 236
22:22:23.931 -> 
22:22:24.129 -> Service mode command:
22:22:24.129 -> Rcv CV Nbr: 17
22:22:24.129 -> Rcv CV Val: 235
22:22:24.129 -> 
22:22:24.269 -> Service mode command:
22:22:24.269 -> Rcv CV Nbr: 17
22:22:24.269 -> Rcv CV Val: 234
22:22:24.269 -> 
22:22:24.457 -> Service mode command:
22:22:24.457 -> Rcv CV Nbr: 17
22:22:24.457 -> Rcv CV Val: 233
22:22:24.457 -> 
22:22:24.644 -> Service mode command:
22:22:24.644 -> Rcv CV Nbr: 17
22:22:24.644 -> Rcv CV Val: 232
22:22:24.644 -> 
22:22:24.832 -> Service mode command:
22:22:24.832 -> Rcv CV Nbr: 17
22:22:24.832 -> Rcv CV Val: 233
22:22:24.832 -> 
22:22:25.066 -> Service mode command:
22:22:25.066 -> Rcv CV Nbr: 18
22:22:25.066 -> Rcv CV Val: 239
22:22:25.066 -> 
22:22:25.223 -> Service mode command:
22:22:25.223 -> Rcv CV Nbr: 18
22:22:25.223 -> Rcv CV Val: 238
22:22:25.223 -> 
22:22:25.394 -> Service mode command:
22:22:25.394 -> Rcv CV Nbr: 18
22:22:25.394 -> Rcv CV Val: 237
22:22:25.394 -> 
22:22:25.644 -> Service mode command:
22:22:25.644 -> Rcv CV Nbr: 18
22:22:25.644 -> Rcv CV Val: 236
22:22:25.644 -> 
22:22:25.785 -> Service mode command:
22:22:25.785 -> Rcv CV Nbr: 18
22:22:25.785 -> Rcv CV Val: 235
22:22:25.785 -> 
22:22:25.973 -> Service mode command:
22:22:25.973 -> Rcv CV Nbr: 18
22:22:25.973 -> Rcv CV Val: 234
22:22:25.973 -> 
22:22:26.160 -> Service mode command:
22:22:26.160 -> Rcv CV Nbr: 18
22:22:26.160 -> Rcv CV Val: 233
22:22:26.160 -> 
22:22:26.301 -> Service mode command:
22:22:26.301 -> Rcv CV Nbr: 18
22:22:26.301 -> Rcv CV Val: 232
22:22:26.301 -> 
22:22:26.489 -> Service mode command:
22:22:26.489 -> Rcv CV Nbr: 18
22:22:26.489 -> Rcv CV Val: 223
22:22:26.489 -> 
```
`

NO result on read function on DR5000 monitor.

trying to read CV get same kind of behavior:

`
```
22:26:24.550 -> Reset Command
22:26:24.596 -> Service mode command:
22:26:24.596 -> Rcv CV Nbr: 1
22:26:24.643 -> Rcv CV Val: 239
22:26:24.643 -> Old CV val= 1
22:26:24.643 -> Bit Man, Bitpos = 7, Bitval = 8
22:26:24.643 -> Verify Cmd. Bits <>
22:26:24.643 -> 
22:26:24.753 -> Service mode command:
22:26:24.753 -> Rcv CV Nbr: 1
22:26:24.753 -> Rcv CV Val: 238
22:26:24.753 -> Old CV val= 1
22:26:24.753 -> Bit Man, Bitpos = 6, Bitval = 8
22:26:24.815 -> Verify Cmd. Bits <>
22:26:24.815 -> 
22:26:24.956 -> Service mode command:
22:26:24.956 -> Rcv CV Nbr: 1
22:26:24.956 -> Rcv CV Val: 237
22:26:24.956 -> Old CV val= 1
22:26:24.956 -> Bit Man, Bitpos = 5, Bitval = 8
22:26:24.956 -> Verify Cmd. Bits <>
22:26:24.956 -> 
22:26:25.143 -> Service mode command:
22:26:25.143 -> Rcv CV Nbr: 1
22:26:25.143 -> Rcv CV Val: 236
22:26:25.143 -> Old CV val= 1
22:26:25.143 -> Bit Man, Bitpos = 4, Bitval = 8
22:26:25.143 -> Verify Cmd. Bits <>
22:26:25.143 -> 
22:26:25.337 -> Service mode command:
22:26:25.337 -> Rcv CV Nbr: 1
22:26:25.337 -> Rcv CV Val: 235
22:26:25.337 -> Old CV val= 1
22:26:25.337 -> Bit Man, Bitpos = 3, Bitval = 8
22:26:25.337 -> Verify Cmd. Bits <>
22:26:25.337 -> 
22:26:25.524 -> Service mode command:
22:26:25.524 -> Rcv CV Nbr: 1
22:26:25.524 -> Rcv CV Val: 234
22:26:25.524 -> Old CV val= 1
22:26:25.524 -> Bit Man, Bitpos = 2, Bitval = 8
22:26:25.524 -> Verify Cmd. Bits <>
22:26:25.524 -> 
22:26:25.696 -> Service mode command:
22:26:25.696 -> Rcv CV Nbr: 1
22:26:25.743 -> Rcv CV Val: 233
22:26:25.743 -> Old CV val= 1
22:26:25.743 -> Bit Man, Bitpos = 1, Bitval = 8
22:26:25.743 -> Verify Cmd. Bits <>
22:26:25.743 -> 
22:26:25.743 -> Service mode command:
22:26:25.743 -> Rcv CV Nbr: 1
22:26:25.743 -> Rcv CV Val: 233
22:26:25.743 -> Old CV val= 1
22:26:25.743 -> Bit Man, Bitpos = 1, Bitval = 8
22:26:25.743 -> Verify Cmd. Bits <>
22:26:25.743 -> 
22:26:25.884 -> Service mode command:
22:26:25.884 -> Rcv CV Nbr: 1
22:26:25.884 -> Rcv CV Val: 232
22:26:25.884 -> Old CV val= 1
22:26:25.884 -> Bit Man, Bitpos = 0, Bitval = 8
22:26:25.884 -> Verify Cmd. Bits <>
22:26:25.884 -> 
22:26:26.024 -> Service mode command:
22:26:26.024 -> Rcv CV Nbr: 1
22:26:26.024 -> Rcv CV Val: 195
22:26:26.024 -> Old CV val= 1
22:26:26.024 -> Verify Byte Cmd - Bytes <> 
22:26:26.024 -> 
```
`

So same troubles as previous oberved.

Next test




from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

2de test conditions:
DR5000 + esu lock pilotdcc v4 +drivemodule (test with motor)
UNO as previous with Serial CV monitor dcc_pin = 2 ack_pin = 4

here is the log:

`

22:38:10.698 -> Test DCC lib - CV Access Cmd
22:38:31.108 -> Reset Command
22:38:31.171 -> Service mode command:
22:38:31.171 -> Rcv CV Nbr: 1
22:38:31.171 -> Rcv CV Val: 239
22:38:31.171 -> Old CV val= 1
22:38:31.171 -> Bit Man, Bitpos = 7, Bitval = 8
22:38:31.171 -> Verify Cmd. Bits <>
22:38:31.171 -> 
22:38:31.342 -> Service mode command:
22:38:31.342 -> Rcv CV Nbr: 1
22:38:31.342 -> Rcv CV Val: 238
22:38:31.342 -> Old CV val= 1
22:38:31.342 -> Bit Man, Bitpos = 6, Bitval = 8
22:38:31.342 -> Verify Cmd. Bits <>
22:38:31.342 -> 
22:38:31.484 -> Service mode command:
22:38:31.484 -> Rcv CV Nbr: 1
22:38:31.484 -> Rcv CV Val: 237
22:38:31.484 -> Old CV val= 1
22:38:31.484 -> Bit Man, Bitpos = 5, Bitval = 8
22:38:31.484 -> Verify Cmd. Bits <>
22:38:31.484 -> 
22:38:31.624 -> Service mode command:
22:38:31.624 -> Rcv CV Nbr: 1
22:38:31.624 -> Rcv CV Val: 236
22:38:31.624 -> Old CV val= 1
22:38:31.624 -> Bit Man, Bitpos = 4, Bitval = 8
22:38:31.624 -> Verify Cmd. Bits <>
22:38:31.624 -> 
22:38:31.812 -> Service mode command:
22:38:31.812 -> Rcv CV Nbr: 1
22:38:31.812 -> Rcv CV Val: 235
22:38:31.812 -> Old CV val= 1
22:38:31.812 -> Bit Man, Bitpos = 3, Bitval = 8
22:38:31.812 -> Verify Cmd. Bits <>
22:38:31.812 -> 
22:38:31.999 -> Service mode command:
22:38:31.999 -> Rcv CV Nbr: 1
22:38:31.999 -> Rcv CV Val: 234
22:38:31.999 -> Old CV val= 1
22:38:31.999 -> Bit Man, Bitpos = 2, Bitval = 8
22:38:31.999 -> Verify Cmd. Bits <>
22:38:31.999 -> 
22:38:32.187 -> Service mode command:
22:38:32.187 -> Rcv CV Nbr: 1
22:38:32.187 -> Rcv CV Val: 233
22:38:32.187 -> Old CV val= 1
22:38:32.187 -> Bit Man, Bitpos = 1, Bitval = 8
22:38:32.187 -> Verify Cmd. Bits <>
22:38:32.187 -> 
22:38:32.328 -> Service mode command:
22:38:32.328 -> Rcv CV Nbr: 1
22:38:32.328 -> Rcv CV Val: 232
22:38:32.328 -> Old CV val= 1
22:38:32.328 -> Bit Man, Bitpos = 0, Bitval = 8
22:38:32.328 -> Verify Cmd. Bits <>
22:38:32.328 -> 
22:38:32.515 -> Service mode command:
22:38:32.515 -> Rcv CV Nbr: 1
22:38:32.515 -> Rcv CV Val: 231
22:38:32.515 -> Old CV val= 1
22:38:32.515 -> Verify Byte Cmd - Bytes <> 
22:38:32.515 -> 

`

So same behavior.

Next test

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

3rd conditions tests:
ESU locpilot dcc v4 +test module (as previous)
Lockprogrammer soft v5.2

Here is the log and shoul be ok :)

`

22:41:26.767 -> Test DCC lib - CV Access Cmd
22:44:07.223 -> Reset Command
22:44:07.551 -> Service mode command:
22:44:07.551 -> Rcv CV Nbr: 1
22:44:07.551 -> Rcv CV Val: 224
22:44:07.551 -> Old CV val= 1
22:44:07.551 -> Bit Man, Bitpos = 0, Bitval = 0
22:44:07.551 -> Verify Cmd. Bits <>
22:44:07.551 -> 
22:44:07.690 -> Service mode command:
22:44:07.690 -> Rcv CV Nbr: 1
22:44:07.690 -> Rcv CV Val: 225
22:44:07.690 -> Old CV val= 1
22:44:07.690 -> Bit Man, Bitpos = 1, Bitval = 0
22:44:07.690 -> Verify Cmd. Bits =
22:44:07.690 -> 
22:44:07.784 -> Service mode command:
22:44:07.784 -> Rcv CV Nbr: 1
22:44:07.784 -> Rcv CV Val: 226
22:44:07.784 -> Old CV val= 1
22:44:07.784 -> Bit Man, Bitpos = 2, Bitval = 0
22:44:07.784 -> Verify Cmd. Bits =
22:44:07.784 -> 
22:44:07.878 -> Service mode command:
22:44:07.878 -> Rcv CV Nbr: 1
22:44:07.878 -> Rcv CV Val: 227
22:44:07.878 -> Old CV val= 1
22:44:07.878 -> Bit Man, Bitpos = 3, Bitval = 0
22:44:07.878 -> Verify Cmd. Bits =
22:44:07.878 -> 
22:44:07.940 -> Service mode command:
22:44:07.940 -> Rcv CV Nbr: 1
22:44:07.940 -> Rcv CV Val: 228
22:44:07.940 -> Old CV val= 1
22:44:07.940 -> Bit Man, Bitpos = 4, Bitval = 0
22:44:07.940 -> Verify Cmd. Bits =
22:44:07.940 -> 
22:44:08.034 -> Service mode command:
22:44:08.034 -> Rcv CV Nbr: 1
22:44:08.034 -> Rcv CV Val: 229
22:44:08.034 -> Old CV val= 1
22:44:08.034 -> Bit Man, Bitpos = 5, Bitval = 0
22:44:08.034 -> Verify Cmd. Bits =
22:44:08.034 -> 
22:44:08.128 -> Service mode command:
22:44:08.128 -> Rcv CV Nbr: 1
22:44:08.128 -> Rcv CV Val: 230
22:44:08.128 -> Old CV val= 1
22:44:08.128 -> Bit Man, Bitpos = 6, Bitval = 0
22:44:08.128 -> Verify Cmd. Bits =
22:44:08.128 -> 
22:44:08.175 -> Service mode command:
22:44:08.175 -> Rcv CV Nbr: 1
22:44:08.221 -> Rcv CV Val: 231
22:44:08.221 -> Old CV val= 1
22:44:08.221 -> Bit Man, Bitpos = 7, Bitval = 0
22:44:08.221 -> Verify Cmd. Bits =
22:44:08.221 -> 
22:44:08.315 -> Service mode command:
22:44:08.315 -> Rcv CV Nbr: 1
22:44:08.315 -> Rcv CV Val: 3
22:44:08.315 -> Old CV val= 1
22:44:08.315 -> Verify Byte Cmd - Bytes <> 
22:44:08.315 -> 

Now test CV17 as arbitrary choice:

`

22:47:11.627 -> Test DCC lib - CV Access Cmd
22:47:17.447 -> Reset Command
22:47:17.791 -> Service mode command:
22:47:17.791 -> Rcv CV Nbr: 17
22:47:17.791 -> Rcv CV Val: 224
22:47:17.791 -> 
22:47:17.885 -> Service mode command:
22:47:17.885 -> Rcv CV Nbr: 17
22:47:17.885 -> Rcv CV Val: 225
22:47:17.885 -> 
22:47:17.978 -> Service mode command:
22:47:17.978 -> Rcv CV Nbr: 17
22:47:17.978 -> Rcv CV Val: 226
22:47:17.978 -> 
22:47:18.025 -> Service mode command:
22:47:18.025 -> Rcv CV Nbr: 17
22:47:18.025 -> Rcv CV Val: 227
22:47:18.025 -> 
22:47:18.119 -> Service mode command:
22:47:18.119 -> Rcv CV Nbr: 17
22:47:18.119 -> Rcv CV Val: 228
22:47:18.119 -> 
22:47:18.228 -> Service mode command:
22:47:18.228 -> Rcv CV Nbr: 17
22:47:18.228 -> Rcv CV Val: 229
22:47:18.228 -> 
22:47:18.291 -> Service mode command:
22:47:18.291 -> Rcv CV Nbr: 17
22:47:18.291 -> Rcv CV Val: 230
22:47:18.291 -> 
22:47:18.385 -> Service mode command:
22:47:18.385 -> Rcv CV Nbr: 17
22:47:18.385 -> Rcv CV Val: 231
22:47:18.385 -> 
22:47:18.525 -> Service mode command:
22:47:18.525 -> Rcv CV Nbr: 17
22:47:18.525 -> Rcv CV Val: 192
22:47:18.525 -> 

`
Result is OK too with it on both sides.
CV can be read and write in this test mode

Next test

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

4st test condition:
LOCKPROGRAMMER v5.3 +hard
DCC decoder with AP lib
Address is 200 CV17 =192 +CV18 =200 +CV29 =32

Try to read CV29:
here is the log

`

22:56:07.069 -> Test DCC lib - CV Access Cmd
22:56:19.887 -> Reset Command
22:56:20.230 -> Service mode command:
22:56:20.230 -> Rcv CV Nbr: 29
22:56:20.230 -> Rcv CV Val: 224
22:56:20.230 -> 
22:56:20.324 -> Service mode command:
22:56:20.324 -> Rcv CV Nbr: 29
22:56:20.371 -> Rcv CV Val: 225
22:56:20.371 -> 
22:56:20.480 -> Service mode command:
22:56:20.480 -> Rcv CV Nbr: 29
22:56:20.480 -> Rcv CV Val: 226
22:56:20.480 -> 
22:56:20.605 -> Service mode command:
22:56:20.605 -> Rcv CV Nbr: 29
22:56:20.605 -> Rcv CV Val: 227
22:56:20.605 -> 
22:56:20.699 -> Service mode command:
22:56:20.699 -> Rcv CV Nbr: 29
22:56:20.699 -> Rcv CV Val: 228
22:56:20.699 -> 
22:56:20.855 -> Service mode command:
22:56:20.855 -> Rcv CV Nbr: 29
22:56:20.855 -> Rcv CV Val: 229
22:56:20.855 -> 
22:56:20.980 -> Service mode command:
22:56:20.980 -> Rcv CV Nbr: 29
22:56:20.980 -> Rcv CV Val: 230
22:56:20.980 -> 
22:56:21.074 -> Service mode command:
22:56:21.074 -> Rcv CV Nbr: 29
22:56:21.074 -> Rcv CV Val: 231
22:56:21.074 -> 
22:56:21.215 -> Service mode command:
22:56:21.215 -> Rcv CV Nbr: 29
22:56:21.215 -> Rcv CV Val: 255
22:56:21.215 -> 
22:56:22.818 -> Reset Command
22:56:23.224 -> Service mode command:
22:56:23.224 -> Rcv CV Nbr: 29
22:56:23.224 -> Rcv CV Val: 224
22:56:23.224 -> 
22:56:23.334 -> Service mode command:
22:56:23.334 -> Rcv CV Nbr: 29
22:56:23.334 -> Rcv CV Val: 225
22:56:23.334 -> 
22:56:23.443 -> Service mode command:
22:56:23.443 -> Rcv CV Nbr: 29
22:56:23.443 -> Rcv CV Val: 226
22:56:23.443 -> 
22:56:23.553 -> Service mode command:
22:56:23.553 -> Rcv CV Nbr: 29
22:56:23.553 -> Rcv CV Val: 227
22:56:23.553 -> 
22:56:23.694 -> Service mode command:
22:56:23.694 -> Rcv CV Nbr: 29
22:56:23.694 -> Rcv CV Val: 228
22:56:23.694 -> 
22:56:23.787 -> Service mode command:
22:56:23.787 -> Rcv CV Nbr: 29
22:56:23.787 -> Rcv CV Val: 229
22:56:23.787 -> 
22:56:23.928 -> Service mode command:
22:56:23.928 -> Rcv CV Nbr: 29
22:56:23.928 -> Rcv CV Val: 230
22:56:23.928 -> 
22:56:24.069 -> Service mode command:
22:56:24.069 -> Rcv CV Nbr: 29
22:56:24.069 -> Rcv CV Val: 231
22:56:24.069 -> 
22:56:24.162 -> Service mode command:
22:56:24.162 -> Rcv CV Nbr: 29
22:56:24.162 -> Rcv CV Val: 255
22:56:24.162 -> 
22:56:25.834 -> Reset Command
22:56:26.162 -> Service mode command:
22:56:26.162 -> Rcv CV Nbr: 29
22:56:26.162 -> Rcv CV Val: 224
22:56:26.162 -> 
22:56:26.272 -> Service mode command:
22:56:26.272 -> Rcv CV Nbr: 29
22:56:26.272 -> Rcv CV Val: 225
22:56:26.272 -> 
22:56:26.412 -> Service mode command:
22:56:26.412 -> Rcv CV Nbr: 29
22:56:26.412 -> Rcv CV Val: 226
22:56:26.412 -> 
22:56:26.506 -> Service mode command:
22:56:26.506 -> Rcv CV Nbr: 29
22:56:26.506 -> Rcv CV Val: 227
22:56:26.506 -> 
22:56:26.653 -> Service mode command:
22:56:26.653 -> Rcv CV Nbr: 29
22:56:26.653 -> Rcv CV Val: 228
22:56:26.653 -> 
22:56:26.747 -> Service mode command:
22:56:26.747 -> Rcv CV Nbr: 29
22:56:26.747 -> Rcv CV Val: 229
22:56:26.747 -> 
22:56:26.887 -> Service mode command:
22:56:26.887 -> Rcv CV Nbr: 29
22:56:26.887 -> Rcv CV Val: 230
22:56:26.887 -> 
22:56:27.028 -> Service mode command:
22:56:27.028 -> Rcv CV Nbr: 29
22:56:27.028 -> Rcv CV Val: 231
22:56:27.028 -> 
22:56:27.122 -> Service mode command:
22:56:27.122 -> Rcv CV Nbr: 29
22:56:27.122 -> Rcv CV Val: 255
22:56:27.122 -> 

Error reading on soft. Unable to read it

New test with CV1:

Before getting teh error message this is the log 👍

`

22:58:53.052 -> Test DCC lib - CV Access Cmd
22:59:04.549 -> Reset Command
22:59:04.877 -> Service mode command:
22:59:04.877 -> Rcv CV Nbr: 1
22:59:04.877 -> Rcv CV Val: 224
22:59:04.877 -> Old CV val= 1
22:59:04.877 -> Bit Man, Bitpos = 0, Bitval = 0
22:59:04.877 -> Verify Cmd. Bits <>
22:59:04.877 -> 
22:59:05.002 -> Service mode command:
22:59:05.002 -> Rcv CV Nbr: 1
22:59:05.002 -> Rcv CV Val: 225
22:59:05.002 -> Old CV val= 1
22:59:05.002 -> Bit Man, Bitpos = 1, Bitval = 0
22:59:05.002 -> Verify Cmd. Bits =
22:59:05.002 -> 
22:59:05.096 -> Service mode command:
22:59:05.096 -> Rcv CV Nbr: 1
22:59:05.096 -> Rcv CV Val: 226
22:59:05.096 -> Old CV val= 1
22:59:05.096 -> Bit Man, Bitpos = 2, Bitval = 0
22:59:05.143 -> Verify Cmd. Bits =
22:59:05.143 -> 
22:59:05.237 -> Service mode command:
22:59:05.237 -> Rcv CV Nbr: 1
22:59:05.237 -> Rcv CV Val: 227
22:59:05.237 -> Old CV val= 1
22:59:05.237 -> Bit Man, Bitpos = 3, Bitval = 0
22:59:05.237 -> Verify Cmd. Bits =
22:59:05.237 -> 
22:59:05.346 -> Service mode command:
22:59:05.346 -> Rcv CV Nbr: 1
22:59:05.346 -> Rcv CV Val: 228
22:59:05.346 -> Old CV val= 1
22:59:05.346 -> Bit Man, Bitpos = 4, Bitval = 0
22:59:05.393 -> Verify Cmd. Bits =
22:59:05.393 -> 
22:59:05.518 -> Service mode command:
22:59:05.518 -> Rcv CV Nbr: 1
22:59:05.518 -> Rcv CV Val: 229
22:59:05.518 -> Old CV val= 1
22:59:05.518 -> Bit Man, Bitpos = 5, Bitval = 0
22:59:05.518 -> Verify Cmd. Bits =
22:59:05.518 -> 
22:59:05.596 -> Service mode command:
22:59:05.596 -> Rcv CV Nbr: 1
22:59:05.596 -> Rcv CV Val: 230
22:59:05.596 -> Old CV val= 1
22:59:05.596 -> Bit Man, Bitpos = 6, Bitval = 0
22:59:05.627 -> Verify Cmd. Bits =
22:59:05.627 -> 
22:59:05.737 -> Service mode command:
22:59:05.737 -> Rcv CV Nbr: 1
22:59:05.737 -> Rcv CV Val: 231
22:59:05.737 -> Old CV val= 1
22:59:05.737 -> Bit Man, Bitpos = 7, Bitval = 0
22:59:05.737 -> Verify Cmd. Bits =
22:59:05.737 -> 
22:59:05.877 -> Service mode command:
22:59:05.877 -> Rcv CV Nbr: 1
22:59:05.877 -> Rcv CV Val: 255
22:59:05.877 -> Old CV val= 1
22:59:05.877 -> Verify Byte Cmd - Bytes <> 
22:59:05.877 -> 
22:59:07.503 -> Reset Command
22:59:07.831 -> Service mode command:
22:59:07.831 -> Rcv CV Nbr: 1
22:59:07.831 -> Rcv CV Val: 224
22:59:07.831 -> Old CV val= 1
22:59:07.831 -> Bit Man, Bitpos = 0, Bitval = 0
22:59:07.831 -> Verify Cmd. Bits <>
22:59:07.831 -> 
22:59:07.987 -> Service mode command:
22:59:07.987 -> Rcv CV Nbr: 1
22:59:07.987 -> Rcv CV Val: 225
22:59:07.987 -> Old CV val= 1
22:59:07.987 -> Bit Man, Bitpos = 1, Bitval = 0
22:59:07.987 -> Verify Cmd. Bits =
22:59:07.987 -> 
22:59:08.081 -> Service mode command:
22:59:08.081 -> Rcv CV Nbr: 1
22:59:08.081 -> Rcv CV Val: 226
22:59:08.081 -> Old CV val= 1
22:59:08.081 -> Bit Man, Bitpos = 2, Bitval = 0
22:59:08.081 -> Verify Cmd. Bits =
22:59:08.081 -> 
22:59:08.206 -> Service mode command:
22:59:08.206 -> Rcv CV Nbr: 1
22:59:08.206 -> Rcv CV Val: 227
22:59:08.206 -> Old CV val= 1
22:59:08.206 -> Bit Man, Bitpos = 3, Bitval = 0
22:59:08.206 -> Verify Cmd. Bits =
22:59:08.206 -> 
22:59:08.347 -> Service mode command:
22:59:08.347 -> Rcv CV Nbr: 1
22:59:08.347 -> Rcv CV Val: 228
22:59:08.347 -> Old CV val= 1
22:59:08.347 -> Bit Man, Bitpos = 4, Bitval = 0
22:59:08.347 -> Verify Cmd. Bits =
22:59:08.347 -> 
22:59:08.473 -> Service mode command:
22:59:08.473 -> Rcv CV Nbr: 1
22:59:08.473 -> Rcv CV Val: 229
22:59:08.473 -> Old CV val= 1
22:59:08.473 -> Bit Man, Bitpos = 5, Bitval = 0
22:59:08.473 -> Verify Cmd. Bits =
22:59:08.473 -> 
22:59:08.602 -> Service mode command:
22:59:08.602 -> Rcv CV Nbr: 1
22:59:08.602 -> Rcv CV Val: 230
22:59:08.602 -> Old CV val= 1
22:59:08.602 -> Bit Man, Bitpos = 6, Bitval = 0
22:59:08.602 -> Verify Cmd. Bits =
22:59:08.602 -> 
22:59:08.696 -> Service mode command:
22:59:08.696 -> Rcv CV Nbr: 1
22:59:08.696 -> Rcv CV Val: 231
22:59:08.696 -> Old CV val= 1
22:59:08.696 -> Bit Man, Bitpos = 7, Bitval = 0
22:59:08.696 -> Verify Cmd. Bits =
22:59:08.696 -> 
22:59:08.837 -> Service mode command:
22:59:08.837 -> Rcv CV Nbr: 1
22:59:08.837 -> Rcv CV Val: 255
22:59:08.837 -> Old CV val= 1
22:59:08.837 -> Verify Byte Cmd - Bytes <> 
22:59:08.837 -> 
22:59:10.481 -> Reset Command
22:59:10.840 -> Service mode command:
22:59:10.840 -> Rcv CV Nbr: 1
22:59:10.840 -> Rcv CV Val: 224
22:59:10.840 -> Old CV val= 1
22:59:10.840 -> Bit Man, Bitpos = 0, Bitval = 0
22:59:10.840 -> Verify Cmd. Bits <>
22:59:10.840 -> 
22:59:10.934 -> Service mode command:
22:59:10.934 -> Rcv CV Nbr: 1
22:59:10.934 -> Rcv CV Val: 225
22:59:10.934 -> Old CV val= 1
22:59:10.934 -> Bit Man, Bitpos = 1, Bitval = 0
22:59:10.934 -> Verify Cmd. Bits =
22:59:10.934 -> 
22:59:11.075 -> Service mode command:
22:59:11.075 -> Rcv CV Nbr: 1
22:59:11.075 -> Rcv CV Val: 226
22:59:11.075 -> Old CV val= 1
22:59:11.075 -> Bit Man, Bitpos = 2, Bitval = 0
22:59:11.075 -> Verify Cmd. Bits =
22:59:11.075 -> 
22:59:11.168 -> Service mode command:
22:59:11.168 -> Rcv CV Nbr: 1
22:59:11.168 -> Rcv CV Val: 227
22:59:11.168 -> Old CV val= 1
22:59:11.215 -> Bit Man, Bitpos = 3, Bitval = 0
22:59:11.215 -> Verify Cmd. Bits =
22:59:11.215 -> 
22:59:11.309 -> Service mode command:
22:59:11.309 -> Rcv CV Nbr: 1
22:59:11.309 -> Rcv CV Val: 228
22:59:11.309 -> Old CV val= 1
22:59:11.309 -> Bit Man, Bitpos = 4, Bitval = 0
22:59:11.309 -> Verify Cmd. Bits =
22:59:11.309 -> 
22:59:11.450 -> Service mode command:
22:59:11.450 -> Rcv CV Nbr: 1
22:59:11.450 -> Rcv CV Val: 229
22:59:11.450 -> Old CV val= 1
22:59:11.450 -> Bit Man, Bitpos = 5, Bitval = 0
22:59:11.450 -> Verify Cmd. Bits =
22:59:11.450 -> 
22:59:11.543 -> Service mode command:
22:59:11.543 -> Rcv CV Nbr: 1
22:59:11.543 -> Rcv CV Val: 230
22:59:11.543 -> Old CV val= 1
22:59:11.543 -> Bit Man, Bitpos = 6, Bitval = 0
22:59:11.543 -> Verify Cmd. Bits =
22:59:11.543 -> 
22:59:11.668 -> Service mode command:
22:59:11.668 -> Rcv CV Nbr: 1
22:59:11.668 -> Rcv CV Val: 231
22:59:11.668 -> Old CV val= 1
22:59:11.668 -> Bit Man, Bitpos = 7, Bitval = 0
22:59:11.668 -> Verify Cmd. Bits =
22:59:11.668 -> 
22:59:11.840 -> Service mode command:
22:59:11.840 -> Rcv CV Nbr: 1
22:59:11.840 -> Rcv CV Val: 255
22:59:11.840 -> Old CV val= 1
22:59:11.840 -> Verify Byte Cmd - Bytes <> 
22:59:11.840 -> 

Next elt:

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

I have change the ack to make blink all leds too

so Read/Ack is ok (blink is oberved on all channel with Lockprogrammer read try)

no way still having issue on read

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Last test done with LENZ LH100 v3.6 + LVZ100 v3.6

Same decoder and result get:

`
00:18:04.897 -> Test DCC lib - CV Access Cmd
00:18:11.038 -> Reset Command
00:18:11.366 -> Service mode command:
00:18:11.366 -> Rcv CV Nbr: 29
00:18:11.366 -> Rcv CV Val: 224
00:18:11.366 ->
00:18:11.460 -> Service mode command:
00:18:11.460 -> Rcv CV Nbr: 29
00:18:11.460 -> Rcv CV Val: 225
00:18:11.460 ->
00:18:11.507 -> Service mode command:
00:18:11.507 -> Rcv CV Nbr: 29
00:18:11.507 -> Rcv CV Val: 226
00:18:11.507 ->
00:18:11.601 -> Service mode command:
00:18:11.601 -> Rcv CV Nbr: 29
00:18:11.601 -> Rcv CV Val: 227
00:18:11.601 ->
00:18:11.648 -> Service mode command:
00:18:11.648 -> Rcv CV Nbr: 29
00:18:11.648 -> Rcv CV Val: 228
00:18:11.648 ->
00:18:11.741 -> Service mode command:
00:18:11.741 -> Rcv CV Nbr: 29
00:18:11.741 -> Rcv CV Val: 229
00:18:11.741 ->
00:18:11.788 -> Service mode command:
00:18:11.788 -> Rcv CV Nbr: 29
00:18:11.788 -> Rcv CV Val: 230
00:18:11.788 ->
00:18:11.882 -> Service mode command:
00:18:11.882 -> Rcv CV Nbr: 29
00:18:11.882 -> Rcv CV Val: 231
00:18:11.882 ->
00:18:11.976 -> Service mode command:
00:18:11.976 -> Rcv CV Nbr: 29
00:18:11.976 -> Rcv CV Val: 0
00:18:11.976 ->
00:18:12.351 -> Service mode command:
00:18:12.351 -> Rcv CV Nbr: 1
00:18:12.351 -> Rcv CV Val: 224
00:18:12.351 -> Old CV val= 1
00:18:12.351 -> Bit Man, Bitpos = 0, Bitval = 0
00:18:12.351 -> Verify Cmd. Bits <>
00:18:12.351 ->
00:18:12.445 -> Service mode command:
00:18:12.445 -> Rcv CV Nbr: 1
00:18:12.445 -> Rcv CV Val: 225
00:18:12.445 -> Old CV val= 1
00:18:12.445 -> Bit Man, Bitpos = 1, Bitval = 0
00:18:12.445 -> Verify Cmd. Bits =
00:18:12.445 ->
00:18:12.491 -> Service mode command:
00:18:12.491 -> Rcv CV Nbr: 1
00:18:12.491 -> Rcv CV Val: 226
00:18:12.491 -> Old CV val= 1
00:18:12.491 -> Bit Man, Bitpos = 2, Bitval = 0
00:18:12.538 -> Verify Cmd. Bits =
00:18:12.538 ->
00:18:12.585 -> Service mode command:
00:18:12.585 -> Rcv CV Nbr: 1
00:18:12.585 -> Rcv CV Val: 227
00:18:12.585 -> Old CV val= 1
00:18:12.585 -> Bit Man, Bitpos = 3, Bitval = 0
00:18:12.585 -> Verify Cmd. Bits =
00:18:12.585 ->
00:18:12.632 -> Service mode command:
00:18:12.632 -> Rcv CV Nbr: 1
00:18:12.632 -> Rcv CV Val: 228
00:18:12.632 -> Old CV val= 1
00:18:12.632 -> Bit Man, Bitpos = 4, Bitval = 0
00:18:12.679 -> Verify Cmd. Bits =
00:18:12.679 ->
00:18:12.726 -> Service mode command:
00:18:12.726 -> Rcv CV Nbr: 1
00:18:12.726 -> Rcv CV Val: 229
00:18:12.726 -> Old CV val= 1
00:18:12.726 -> Bit Man, Bitpos = 5, Bitval = 0
00:18:12.726 -> Verify Cmd. Bits =
00:18:12.726 ->
00:18:12.773 -> Service mode command:
00:18:12.773 -> Rcv CV Nbr: 1
00:18:12.773 -> Rcv CV Val: 230
00:18:12.773 -> Old CV val= 1
00:18:12.820 -> Bit Man, Bitpos = 6, Bitval = 0
00:18:12.820 -> Verify Cmd. Bits =
00:18:12.820 ->
00:18:12.866 -> Service mode command:
00:18:12.866 -> Rcv CV Nbr: 1
00:18:12.866 -> Rcv CV Val: 231
00:18:12.866 -> Old CV val= 1
00:18:12.866 -> Bit Man, Bitpos = 7, Bitval = 0
00:18:12.866 -> Verify Cmd. Bits =
00:18:12.866 ->
00:18:12.960 -> Service mode command:
00:18:12.960 -> Rcv CV Nbr: 1
00:18:12.960 -> Rcv CV Val: 0
00:18:12.960 -> Old CV val= 1
00:18:12.960 -> Verify Byte Cmd - Bytes <>
00:18:13.007 ->
00:18:13.335 -> Service mode command:
00:18:13.335 -> Rcv CV Nbr: 19
00:18:13.335 -> Rcv CV Val: 224
00:18:13.335 ->
00:18:13.429 -> Service mode command:
00:18:13.429 -> Rcv CV Nbr: 19
00:18:13.429 -> Rcv CV Val: 225
00:18:13.429 ->
00:18:13.476 -> Service mode command:
00:18:13.476 -> Rcv CV Nbr: 19
00:18:13.476 -> Rcv CV Val: 226
00:18:13.476 ->
00:18:13.570 -> Service mode command:
00:18:13.570 -> Rcv CV Nbr: 19
00:18:13.570 -> Rcv CV Val: 227
00:18:13.570 ->
00:18:13.617 -> Service mode command:
00:18:13.617 -> Rcv CV Nbr: 19
00:18:13.617 -> Rcv CV Val: 228
00:18:13.617 ->
00:18:13.710 -> Service mode command:
00:18:13.710 -> Rcv CV Nbr: 19
00:18:13.710 -> Rcv CV Val: 229
00:18:13.710 ->
00:18:13.757 -> Service mode command:
00:18:13.757 -> Rcv CV Nbr: 19
00:18:13.804 -> Rcv CV Val: 230
00:18:13.804 ->
00:18:13.851 -> Service mode command:
00:18:13.851 -> Rcv CV Nbr: 19
00:18:13.851 -> Rcv CV Val: 231
00:18:13.851 ->
00:18:13.945 -> Service mode command:
00:18:13.945 -> Rcv CV Nbr: 19
00:18:13.992 -> Rcv CV Val: 200
00:18:13.992 ->

`
get m 000 on display LH100

from ap_dcc_library.

aikopras avatar aikopras commented on August 18, 2024

Hi Laurent.

I think I have found the error. After correcting the error it now works with my OpenDCC Command Station as well.
The error was in the file "sup_cv.cpp", and with my setting of the bit value (which I forgot to shift right). This error did not occur with the LENZ LZV 100, since Lenz always checked if the bit value was 0. However, the error occurred with other command stations, such as OpenDCC, that did also check for bit values 1. Without shifting, my library returned the value 8, instead of 1.

I have updated in the Github repository the file "sup_cv.cpp", as well as the test file "CV_Access-Serial_monitor".
Can you replace your old files and check with these new files?
Let me know if it is now working well. If yes, all create a new release.

Bye

Aiko

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Dear Aiko

Thanks for your support and reactivity!

I made the required tests following your proposal with:

Test 2.1:
ESU LOCKPROGRAMMER
ESU LOCKPILOT V4DCC dcc decoder on hardware platine (motor led...etc)

sup_cv.cpp updated on lib before compile step and loaded to UNO with New Serial CV ino load into decoder
Only change pin to map with my hardware.

WRITE IS OK: updating CV18 from val 150 up to 151

17:26:50.797 -> Reset Command
17:26:51.125 -> Service mode command:
17:26:51.125 -> Received CV Number: 18
17:26:51.125 -> Received CV Value: 151
17:26:51.125 -> CV value stored in decoder = 150 (10010110)
17:26:51.125 -> Write Byte Command
17:26:51.172 ->

READ IS OK: check to verify results

17:27:52.302 -> Reset Command
17:27:52.630 -> Service mode command:
17:27:52.630 -> Received CV Number: 18
17:27:52.630 -> Received CV Value: 224
17:27:52.630 -> CV value stored in decoder = 151 (10010111)
17:27:52.630 -> Bit Manupulation - Verify Command, Bitposition = 0, Bitvalue = 0
17:27:52.630 -> Bits are unequal
17:27:52.630 ->
17:27:52.771 -> Service mode command:
17:27:52.771 -> Received CV Number: 18
17:27:52.771 -> Received CV Value: 225
17:27:52.771 -> CV value stored in decoder = 151 (10010111)
17:27:52.771 -> Bit Manupulation - Verify Command, Bitposition = 1, Bitvalue = 0
17:27:52.771 -> Bits are unequal
17:27:52.771 ->
17:27:52.865 -> Service mode command:
17:27:52.865 -> Received CV Number: 18
17:27:52.865 -> Received CV Value: 226
17:27:52.865 -> CV value stored in decoder = 151 (10010111)
17:27:52.865 -> Bit Manupulation - Verify Command, Bitposition = 2, Bitvalue = 0
17:27:52.912 -> Bits are unequal
17:27:52.912 ->
17:27:53.005 -> Service mode command:
17:27:53.005 -> Received CV Number: 18
17:27:53.005 -> Received CV Value: 227
17:27:53.005 -> CV value stored in decoder = 151 (10010111)
17:27:53.005 -> Bit Manupulation - Verify Command, Bitposition = 3, Bitvalue = 0
17:27:53.005 -> Bits are equal
17:27:53.005 ->
17:27:53.099 -> Service mode command:
17:27:53.099 -> Received CV Number: 18
17:27:53.099 -> Received CV Value: 228
17:27:53.099 -> CV value stored in decoder = 151 (10010111)
17:27:53.099 -> Bit Manupulation - Verify Command, Bitposition = 4, Bitvalue = 0
17:27:53.099 -> Bits are unequal
17:27:53.099 ->
17:27:53.193 -> Service mode command:
17:27:53.193 -> Received CV Number: 18
17:27:53.193 -> Received CV Value: 229
17:27:53.193 -> CV value stored in decoder = 151 (10010111)
17:27:53.193 -> Bit Manupulation - Verify Command, Bitposition = 5, Bitvalue = 0
17:27:53.193 -> Bits are equal
17:27:53.193 ->
17:27:53.287 -> Service mode command:
17:27:53.287 -> Received CV Number: 18
17:27:53.287 -> Received CV Value: 230
17:27:53.287 -> CV value stored in decoder = 151 (10010111)
17:27:53.287 -> Bit Manupulation - Verify Command, Bitposition = 6, Bitvalue = 0
17:27:53.287 -> Bits are equal
17:27:53.287 ->
17:27:53.334 -> Service mode command:
17:27:53.334 -> Received CV Number: 18
17:27:53.380 -> Received CV Value: 231
17:27:53.380 -> CV value stored in decoder = 151 (10010111)
17:27:53.380 -> Bit Manupulation - Verify Command, Bitposition = 7, Bitvalue = 0
17:27:53.380 -> Bits are unequal
17:27:53.380 ->
17:27:53.475 -> Service mode command:
17:27:53.475 -> Received CV Number: 18
17:27:53.475 -> Received CV Value: 151
17:27:53.522 -> CV value stored in decoder = 151 (10010111)
17:27:53.522 -> Verify Byte Command - Bytes are equal
17:27:53.522 ->

Other test with read CV1: ( val is 3)

17:32:22.574 -> Reset Command
17:32:22.902 -> Service mode command:
17:32:22.902 -> Received CV Number: 1
17:32:22.902 -> Received CV Value: 224
17:32:22.902 -> CV value stored in decoder = 1 (00000001)
17:32:22.949 -> Bit Manupulation - Verify Command, Bitposition = 0, Bitvalue = 0
17:32:22.949 -> Bits are unequal
17:32:22.949 ->
17:32:23.043 -> Service mode command:
17:32:23.043 -> Received CV Number: 1
17:32:23.043 -> Received CV Value: 225
17:32:23.043 -> CV value stored in decoder = 1 (00000001)
17:32:23.043 -> Bit Manupulation - Verify Command, Bitposition = 1, Bitvalue = 0
17:32:23.043 -> Bits are equal
17:32:23.043 ->
17:32:23.183 -> Service mode command:
17:32:23.183 -> Received CV Number: 1
17:32:23.183 -> Received CV Value: 226
17:32:23.183 -> CV value stored in decoder = 1 (00000001)
17:32:23.183 -> Bit Manupulation - Verify Command, Bitposition = 2, Bitvalue = 0
17:32:23.183 -> Bits are equal
17:32:23.183 ->
17:32:23.230 -> Service mode command:
17:32:23.230 -> Received CV Number: 1
17:32:23.230 -> Received CV Value: 227
17:32:23.230 -> CV value stored in decoder = 1 (00000001)
17:32:23.230 -> Bit Manupulation - Verify Command, Bitposition = 3, Bitvalue = 0
17:32:23.277 -> Bits are equal
17:32:23.277 ->
17:32:23.324 -> Service mode command:
17:32:23.324 -> Received CV Number: 1
17:32:23.324 -> Received CV Value: 228
17:32:23.324 -> CV value stored in decoder = 1 (00000001)
17:32:23.324 -> Bit Manupulation - Verify Command, Bitposition = 4, Bitvalue = 0
17:32:23.324 -> Bits are equal
17:32:23.324 ->
17:32:23.418 -> Service mode command:
17:32:23.418 -> Received CV Number: 1
17:32:23.418 -> Received CV Value: 229
17:32:23.418 -> CV value stored in decoder = 1 (00000001)
17:32:23.418 -> Bit Manupulation - Verify Command, Bitposition = 5, Bitvalue = 0
17:32:23.418 -> Bits are equal
17:32:23.418 ->
17:32:23.511 -> Service mode command:
17:32:23.511 -> Received CV Number: 1
17:32:23.511 -> Received CV Value: 230
17:32:23.511 -> CV value stored in decoder = 1 (00000001)
17:32:23.511 -> Bit Manupulation - Verify Command, Bitposition = 6, Bitvalue = 0
17:32:23.511 -> Bits are equal
17:32:23.511 ->
17:32:23.558 -> Service mode command:
17:32:23.558 -> Received CV Number: 1
17:32:23.558 -> Received CV Value: 231
17:32:23.558 -> CV value stored in decoder = 1 (00000001)
17:32:23.605 -> Bit Manupulation - Verify Command, Bitposition = 7, Bitvalue = 0
17:32:23.605 -> Bits are equal
17:32:23.605 ->
17:32:23.652 -> Service mode command:
17:32:23.652 -> Received CV Number: 1
17:32:23.652 -> Received CV Value: 3
17:32:23.652 -> CV value stored in decoder = 1 (00000001)
17:32:23.652 -> Verify Byte Command - Bytes are unequal
17:32:23.652 ->

So looks like OK :) for mathcing with "ESU world" :)

Well done!

now i swap to LENZ to check potential side effect?

from ap_dcc_library.

aikopras avatar aikopras commented on August 18, 2024

Sounds good! :-)
Yes, please check with other Command Systems as well. Checking now is relatively easy, since we have everything in our heads by now.

Thanks for your error report; such reports help to improve the software!
Bye
Aiko

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Test 2.2:

Same condition test but now DCC COMMAND STATION are LENZ LVH100 +LVZ100
changing address from 6 to 3

17:42:51.720 -> Reset Command
17:42:52.048 -> Service mode command:
17:42:52.048 -> Received CV Number: 29
17:42:52.048 -> Received CV Value: 224
17:42:52.048 -> CV value stored in decoder = 29 (00011101)
17:42:52.048 -> Bit Manupulation - Verify Command, Bitposition = 0, Bitvalue = 0
17:42:52.048 -> Bits are unequal
17:42:52.048 -> 
17:42:52.142 -> Service mode command:
17:42:52.142 -> Received CV Number: 29
17:42:52.142 -> Received CV Value: 225
17:42:52.142 -> CV value stored in decoder = 29 (00011101)
17:42:52.142 -> Bit Manupulation - Verify Command, Bitposition = 1, Bitvalue = 0
17:42:52.142 -> Bits are equal
17:42:52.142 -> 
17:42:52.189 -> Service mode command:
17:42:52.189 -> Received CV Number: 29
17:42:52.189 -> Received CV Value: 226
17:42:52.189 -> CV value stored in decoder = 29 (00011101)
17:42:52.236 -> Bit Manupulation - Verify Command, Bitposition = 2, Bitvalue = 0
17:42:52.236 -> Bits are unequal
17:42:52.236 -> 
17:42:52.282 -> Service mode command:
17:42:52.282 -> Received CV Number: 29
17:42:52.282 -> Received CV Value: 227
17:42:52.282 -> CV value stored in decoder = 29 (00011101)
17:42:52.282 -> Bit Manupulation - Verify Command, Bitposition = 3, Bitvalue = 0
17:42:52.282 -> Bits are unequal
17:42:52.282 -> 
17:42:52.329 -> Service mode command:
17:42:52.329 -> Received CV Number: 29
17:42:52.376 -> Received CV Value: 228
17:42:52.376 -> CV value stored in decoder = 29 (00011101)
17:42:52.376 -> Bit Manupulation - Verify Command, Bitposition = 4, Bitvalue = 0
17:42:52.376 -> Bits are unequal
17:42:52.376 -> 
17:42:52.423 -> Service mode command:
17:42:52.423 -> Received CV Number: 29
17:42:52.423 -> Received CV Value: 229
17:42:52.423 -> CV value stored in decoder = 29 (00011101)
17:42:52.423 -> Bit Manupulation - Verify Command, Bitposition = 5, Bitvalue = 0
17:42:52.423 -> Bits are equal
17:42:52.423 -> 
17:42:52.517 -> Service mode command:
17:42:52.517 -> Received CV Number: 29
17:42:52.517 -> Received CV Value: 230
17:42:52.517 -> CV value stored in decoder = 29 (00011101)
17:42:52.517 -> Bit Manupulation - Verify Command, Bitposition = 6, Bitvalue = 0
17:42:52.517 -> Bits are equal
17:42:52.517 -> 
17:42:52.564 -> Service mode command:
17:42:52.564 -> Received CV Number: 29
17:42:52.564 -> Received CV Value: 231
17:42:52.611 -> CV value stored in decoder = 29 (00011101)
17:42:52.611 -> Bit Manupulation - Verify Command, Bitposition = 7, Bitvalue = 0
17:42:52.611 -> Bits are equal
17:42:52.611 -> 
17:42:52.704 -> Service mode command:
17:42:52.704 -> Received CV Number: 29
17:42:52.704 -> Received CV Value: 29
17:42:52.704 -> CV value stored in decoder = 29 (00011101)
17:42:52.704 -> Verify Byte Command - Bytes are equal
17:42:52.704 -> 
17:42:53.079 -> Service mode command:
17:42:53.079 -> Received CV Number: 19
17:42:53.079 -> Received CV Value: 0
17:42:53.079 -> CV value stored in decoder = 0 (00000000)
17:42:53.079 -> Write Byte Command
17:42:53.126 -> 
17:42:53.595 -> Service mode command:
17:42:53.595 -> Received CV Number: 29
17:42:53.595 -> Received CV Value: 29
17:42:53.595 -> CV value stored in decoder = 29 (00011101)
17:42:53.595 -> Write Byte Command
17:42:53.595 -> 
17:42:54.054 -> Service mode command:
17:42:54.054 -> Received CV Number: 1
17:42:54.054 -> Received CV Value: 3
17:42:54.054 -> CV value stored in decoder = 6 (00000110)
17:42:54.054 -> Write Byte Command
17:42:54.054 -> 

Read adress after change:

17:45:09.270 -> Reset Command
17:45:09.598 -> Service mode command:
17:45:09.598 -> Received CV Number: 29
17:45:09.598 -> Received CV Value: 224
17:45:09.598 -> CV value stored in decoder = 29 (00011101)
17:45:09.645 -> Bit Manupulation - Verify Command, Bitposition = 0, Bitvalue = 0
17:45:09.645 -> Bits are unequal
17:45:09.645 -> 
17:45:09.691 -> Service mode command:
17:45:09.691 -> Received CV Number: 29
17:45:09.691 -> Received CV Value: 225
17:45:09.691 -> CV value stored in decoder = 29 (00011101)
17:45:09.691 -> Bit Manupulation - Verify Command, Bitposition = 1, Bitvalue = 0
17:45:09.691 -> Bits are equal
17:45:09.691 -> 
17:45:09.785 -> Service mode command:
17:45:09.785 -> Received CV Number: 29
17:45:09.785 -> Received CV Value: 226
17:45:09.785 -> CV value stored in decoder = 29 (00011101)
17:45:09.785 -> Bit Manupulation - Verify Command, Bitposition = 2, Bitvalue = 0
17:45:09.785 -> Bits are unequal
17:45:09.785 -> 
17:45:09.832 -> Service mode command:
17:45:09.832 -> Received CV Number: 29
17:45:09.832 -> Received CV Value: 227
17:45:09.832 -> CV value stored in decoder = 29 (00011101)
17:45:09.832 -> Bit Manupulation - Verify Command, Bitposition = 3, Bitvalue = 0
17:45:09.832 -> Bits are unequal
17:45:09.832 -> 
17:45:09.926 -> Service mode command:
17:45:09.926 -> Received CV Number: 29
17:45:09.926 -> Received CV Value: 228
17:45:09.926 -> CV value stored in decoder = 29 (00011101)
17:45:09.926 -> Bit Manupulation - Verify Command, Bitposition = 4, Bitvalue = 0
17:45:09.926 -> Bits are unequal
17:45:09.926 -> 
17:45:09.973 -> Service mode command:
17:45:09.973 -> Received CV Number: 29
17:45:09.973 -> Received CV Value: 229
17:45:09.973 -> CV value stored in decoder = 29 (00011101)
17:45:09.973 -> Bit Manupulation - Verify Command, Bitposition = 5, Bitvalue = 0
17:45:10.020 -> Bits are equal
17:45:10.020 -> 
17:45:10.066 -> Service mode command:
17:45:10.066 -> Received CV Number: 29
17:45:10.066 -> Received CV Value: 230
17:45:10.066 -> CV value stored in decoder = 29 (00011101)
17:45:10.066 -> Bit Manupulation - Verify Command, Bitposition = 6, Bitvalue = 0
17:45:10.066 -> Bits are equal
17:45:10.066 -> 
17:45:10.160 -> Service mode command:
17:45:10.160 -> Received CV Number: 29
17:45:10.160 -> Received CV Value: 231
17:45:10.160 -> CV value stored in decoder = 29 (00011101)
17:45:10.160 -> Bit Manupulation - Verify Command, Bitposition = 7, Bitvalue = 0
17:45:10.160 -> Bits are equal
17:45:10.160 -> 
17:45:10.254 -> Service mode command:
17:45:10.254 -> Received CV Number: 29
17:45:10.254 -> Received CV Value: 29
17:45:10.254 -> CV value stored in decoder = 29 (00011101)
17:45:10.254 -> Verify Byte Command - Bytes are equal
17:45:10.301 -> 
17:45:10.629 -> Service mode command:
17:45:10.629 -> Received CV Number: 1
17:45:10.629 -> Received CV Value: 224
17:45:10.629 -> CV value stored in decoder = 3 (00000011)
17:45:10.676 -> Bit Manupulation - Verify Command, Bitposition = 0, Bitvalue = 0
17:45:10.676 -> Bits are unequal
17:45:10.676 -> 
17:45:10.723 -> Service mode command:
17:45:10.723 -> Received CV Number: 1
17:45:10.723 -> Received CV Value: 225
17:45:10.723 -> CV value stored in decoder = 3 (00000011)
17:45:10.723 -> Bit Manupulation - Verify Command, Bitposition = 1, Bitvalue = 0
17:45:10.723 -> Bits are unequal
17:45:10.723 -> 
17:45:10.816 -> Service mode command:
17:45:10.816 -> Received CV Number: 1
17:45:10.816 -> Received CV Value: 226
17:45:10.816 -> CV value stored in decoder = 3 (00000011)
17:45:10.816 -> Bit Manupulation - Verify Command, Bitposition = 2, Bitvalue = 0
17:45:10.816 -> Bits are equal
17:45:10.816 -> 
17:45:10.863 -> Service mode command:
17:45:10.863 -> Received CV Number: 1
17:45:10.863 -> Received CV Value: 227
17:45:10.863 -> CV value stored in decoder = 3 (00000011)
17:45:10.863 -> Bit Manupulation - Verify Command, Bitposition = 3, Bitvalue = 0
17:45:10.910 -> Bits are equal
17:45:10.910 -> 
17:45:10.957 -> Service mode command:
17:45:10.957 -> Received CV Number: 1
17:45:10.957 -> Received CV Value: 228
17:45:10.957 -> CV value stored in decoder = 3 (00000011)
17:45:10.957 -> Bit Manupulation - Verify Command, Bitposition = 4, Bitvalue = 0
17:45:10.957 -> Bits are equal
17:45:10.957 -> 
17:45:11.051 -> Service mode command:
17:45:11.051 -> Received CV Number: 1
17:45:11.051 -> Received CV Value: 229
17:45:11.051 -> CV value stored in decoder = 3 (00000011)
17:45:11.051 -> Bit Manupulation - Verify Command, Bitposition = 5, Bitvalue = 0
17:45:11.051 -> Bits are equal
17:45:11.051 -> 
17:45:11.098 -> Service mode command:
17:45:11.098 -> Received CV Number: 1
17:45:11.145 -> Received CV Value: 230
17:45:11.145 -> CV value stored in decoder = 3 (00000011)
17:45:11.145 -> Bit Manupulation - Verify Command, Bitposition = 6, Bitvalue = 0
17:45:11.145 -> Bits are equal
17:45:11.145 -> 
17:45:11.191 -> Service mode command:
17:45:11.191 -> Received CV Number: 1
17:45:11.191 -> Received CV Value: 231
17:45:11.191 -> CV value stored in decoder = 3 (00000011)
17:45:11.191 -> Bit Manupulation - Verify Command, Bitposition = 7, Bitvalue = 0
17:45:11.191 -> Bits are equal
17:45:11.191 -> 
17:45:11.332 -> Service mode command:
17:45:11.332 -> Received CV Number: 1
17:45:11.332 -> Received CV Value: 3
17:45:11.332 -> CV value stored in decoder = 3 (00000011)
17:45:11.332 -> Verify Byte Command - Bytes are equal
17:45:11.332 -> 
17:45:11.707 -> Service mode command:
17:45:11.707 -> Received CV Number: 19
17:45:11.707 -> Received CV Value: 224
17:45:11.707 -> CV value stored in decoder = 0 (00000000)
17:45:11.707 -> Bit Manupulation - Verify Command, Bitposition = 0, Bitvalue = 0
17:45:11.707 -> Bits are equal
17:45:11.707 -> 
17:45:11.801 -> Service mode command:
17:45:11.801 -> Received CV Number: 19
17:45:11.801 -> Received CV Value: 225
17:45:11.801 -> CV value stored in decoder = 0 (00000000)
17:45:11.801 -> Bit Manupulation - Verify Command, Bitposition = 1, Bitvalue = 0
17:45:11.801 -> Bits are equal
17:45:11.801 -> 
17:45:11.848 -> Service mode command:
17:45:11.848 -> Received CV Number: 19
17:45:11.848 -> Received CV Value: 226
17:45:11.848 -> CV value stored in decoder = 0 (00000000)
17:45:11.848 -> Bit Manupulation - Verify Command, Bitposition = 2, Bitvalue = 0
17:45:11.895 -> Bits are equal
17:45:11.895 -> 
17:45:11.941 -> Service mode command:
17:45:11.941 -> Received CV Number: 19
17:45:11.941 -> Received CV Value: 227
17:45:11.941 -> CV value stored in decoder = 0 (00000000)
17:45:11.941 -> Bit Manupulation - Verify Command, Bitposition = 3, Bitvalue = 0
17:45:11.941 -> Bits are equal
17:45:11.941 -> 
17:45:12.035 -> Service mode command:
17:45:12.035 -> Received CV Number: 19
17:45:12.035 -> Received CV Value: 228
17:45:12.035 -> CV value stored in decoder = 0 (00000000)
17:45:12.035 -> Bit Manupulation - Verify Command, Bitposition = 4, Bitvalue = 0
17:45:12.035 -> Bits are equal
17:45:12.035 -> 
17:45:12.082 -> Service mode command:
17:45:12.082 -> Received CV Number: 19
17:45:12.129 -> Received CV Value: 229
17:45:12.129 -> CV value stored in decoder = 0 (00000000)
17:45:12.129 -> Bit Manupulation - Verify Command, Bitposition = 5, Bitvalue = 0
17:45:12.129 -> Bits are equal
17:45:12.129 -> 
17:45:12.177 -> Service mode command:
17:45:12.177 -> Received CV Number: 19
17:45:12.177 -> Received CV Value: 230
17:45:12.177 -> CV value stored in decoder = 0 (00000000)
17:45:12.177 -> Bit Manupulation - Verify Command, Bitposition = 6, Bitvalue = 0
17:45:12.177 -> Bits are equal
17:45:12.177 -> 
17:45:12.271 -> Service mode command:
17:45:12.271 -> Received CV Number: 19
17:45:12.271 -> Received CV Value: 231
17:45:12.271 -> CV value stored in decoder = 0 (00000000)
17:45:12.271 -> Bit Manupulation - Verify Command, Bitposition = 7, Bitvalue = 0
17:45:12.271 -> Bits are equal
17:45:12.271 -> 
17:45:12.412 -> Service mode command:
17:45:12.412 -> Received CV Number: 19
17:45:12.412 -> Received CV Value: 0
17:45:12.412 -> CV value stored in decoder = 0 (00000000)
17:45:12.412 -> Verify Byte Command - Bytes are equal
17:45:12.412 -> 

Look good. BUT its stange to receive CV19 elements dont you think?

So i m a bit confused on how to get the final value and manage it to eupdate eeprom as exemple + reste decoder reading new CV values...

May you can give me some tips for that.( good exemple in the lib should help)

I will make some other tests with differents elements

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

HI Aiko :)

I finaly succeed in my tests to read and write without issue on some command station side.
On DR5000:
Decoder built with AP DCC LIB. Tests done on Nano every
Anyway CV numbers keep a +1 name. As exemple if you wanna read CV1 on the decoder you should select ( CV1 + 1) on DR5000 interface to get the real value on the decoder built with AP DCC LIB. (including your last changes)
But that s OK and succed in all try.
Read or write is made without the "snifer" on a UNO keeping DCC signal on the same source after diode bridge.
Connecting it it avoid capability to read write bypassing the 60ma drop needed!
nano every MUST ebe too in standalone mode ( no connection on USB side)
You must disconnect too from PC the nano every to do this write/read process with succes and set GND and +5V from a external power source ( ex LM7805 after diode bridge from DCC Signal ( be carefull a bit hot)
I can drive drive OUTPUTS without problem and decoder adress load at startup.
I will need to adpat my test code to keep in charge cv change ( accroding address) may you could give me some clue on that step) ( reset CPU? re read all cv on n ext loop?)

About LENZ LH100 side:
Drive without issue but with this hardware althoug it s ok from DR 5000 side i m not abble to have a address Read ( get error 2) each time.

With ESU LOCKPROGRAMMER it s the same kind of things. Unable to read/ write.

I m suspecting power issue (to late to start on)
I will process new tests tomorow with external power source not keeping energie from DCC bus for these command stations directly..

I will test to with another diode bridge front + dcc in stage for the "Serial CV "snifer" and check results in parallel to compare.

Thanks anyway for your updates.
Laurent

from ap_dcc_library.

aikopras avatar aikopras commented on August 18, 2024

Hi Laurent

For possible example code that deals with CVs and EEPROMs, you can look at AP_DCC_Decoder_Core. In principle, the decoder must be reset to ensure the new value is used before you do anything else. In practice (also with my programmer software for MACs OS) I sometimes set multiple CVs first, and do the reset after I've changed all necessary CVs.

I'm a bit surprised to see the "1" offset with the DR5000. One possible way to deal with that, is to add DR5000 to the possible Command Stations that I "have" in CV19 (CmdStation) of my AP_DCC_Decoder_Core library.

Talking about CV19, I have no clue why your Lenz system is quering that. In principle CV19 can be used for "Address Mirroring". I've "stolen" that CV for my decoders to deal with different behaviour of Command Stations.

Regarding the tests on your Lenz LZV100 system, I don't understand why it behaves differently (calls CV29 as well as 19) compared to my test (only CV1). In my test I typed "8" (PROG), "Enter", "-" until the display shows CV, "Enter", "1", "Enter", "Enter". Did you do the same??

Error 2 on the LH100 says no feedback from decoder while programming.
In fact I'm not sure I completely understand all details in your last message. I got the impression from the earlier mails that the READ tests succeeded, but from the (second part of your) last message I get the opposite impression. Is it that it works without Sniffer, but fails with your sniffer??

Bye
Aiko

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Hi Aiko

Sorry about my unclear items.

HARDWARE ADJUSTEMENTS:
I changed my powersupply mode to get success in all combination tests. ( LH100, RD5000,or LOCKPROGRAMMER)

Suggested optimised connections /connections:
External power supply connect on VIN on NANO EVERY.
Command station on DCC side ( prog track outputs)
From this DCC connetor layout is composed by:
bridge rectifer up to V for ACK part layout: from + on bridge rectifier add 200r resistor ( preffered power resistor in case of long ack) +N mosfet drived by A3 output)
on dcc signal conversion use fast schottky diode from DCC ( one side J or K) add resistor divider bridge after the fast diode (10K + 10K) and connect the middle point to N MOSFET gate. On the drain side of such mosfet add a +5V through a 100K resistor pull up and link this point ( after resistor) to dcc_pin to digital IN on decoder/nano every) ( This is similar as OPTO 6N137)

For the moment i did not use CV Serial monitor on UNO. (unconnected)

ABOUT TESTS:
LH100:
I remade some tests like you explained with direct CV from LENZ LH100. I get the same SWAP+1 adressing: I get the CV1 value reading the CV2 and so one.
I used your method to read directly the requested CV.

Anyway if i used Address read i get error 2 or m 000 ( due to CV swap+1) ( PROG /DIR /ADR /A enter)
So it s totaly similar as DR5000 test results.

LOCKPROGRAMMER: same behavior (SWAP CV+1) but need to change ACK layout to let have more delta load detected.
Ok anyway!

Hope it will help to fix the +1 swap :)

Laurent

from ap_dcc_library.

aikopras avatar aikopras commented on August 18, 2024

Hi Laurent

Thanks, I think I understand.
Let me try to summarise.

  1. Direct CV reading, as I did in my test, works.
    However, a difference between you and me is that you get an offset of 1 (whereas I believe I didn't had that offset).
    Question: you are using the same test program as I, thus the one that I updated yesterday on Github?
    Conclusion, this is an issue we have to solve. Shouldn't be hard, but it should be done in the right way.

  2. If you Read CVs in "other" modes, my library doesn't work.
    Indeed, my library does not implement all modes. Which modes are implemented, is documented in the file sup_cv.cpp.

  • Direct Configuration( Direct Mode) => implemented
  • Physical Register => not implemented
  • Address-Only => not implemented
  • Paged Addressing => not implemented

A) Direct Configuration (=long form)
This mode is implemented by virtually all systems. Therefore it is also implemented in my library.
On a LENZ LH100, you can start this mode by typing PROG - CV - ...

B) Physical Register (=short form)
This mode allows setting the address (CV1 / 17+18), Start Voltage (CV2), Acceleration (CV3), Deceleration/Braking (CV4) etc.
On a LENZ LH100, you can start this mode by typing PROG - DIR - ADR / ACC / DCC / STV / MAX / ID.
Except for the address, all CVs are intended for multi-function (=loco) decoders. For Accessory Decoders, CV2, 3 etc have a completely different meaning (like the time a certain switch output should remain activated).
I assume that my library is primarily used by people who built accessory decoders (instead of loco decoders).
Therefore I decided to not implement this mode.

C) Address Only:
Is a way to program the Address only. Seems to be a historic approach, and has therefore not be implemented by me.
I also don't think that Lenz has implemented this.

D) Paged Addressing
Paged Addressing allows access to all 1024 CVs, without adding an additional CV Address byte to the packet. That was useful in times where implementations could hold 255 CVs only. To get access to CVs beyond the 255 boundary, special registers (CV31 and CV32) must first be filled with a value representing the offset within that page.
Seems to be also a relict from the past, and should (according to RCN 214) no longer be used.

Questions:

  • Are you implementing Accessory Decoders, or Multi-Function decoders?
  • Do you agree that for Accessory Decoders only the Direct Mode makes sense?

Depending on your answers, I might have some other questions. But let's do things one by one.

Bye

Aiko

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Hi Aiko

I m focused on FUNCTION DECODER properly ( mobil decoder for coach or loco) . This is my target devlopment for witch one i suggest to share my basic exemples to your lib as exemples if you agree with that proposal?

When i used LH 100 it s a" basic address mode" ( direct CV access) as you have discribed previously . CV by CV mode is OK with DR5000 CV read/write and Lockprogrammer read write CV only. ( just have +1)

Anyway this system like the LH100 offer a ADDRESS read option that can deal with CV29 bit5 CV1 or CV17 CV18 to give you back/set the value.
In the same way you could use it to set all items "one shot" fixing desired address ( You should not take care about CV really, the soft is managing them in a blind mode. ( may be the famour address mode?)

With your LH100 you should try this by: ADDRESS ACCESS: PROG/PROG/DIR/ADR A enter a value to set it or press enter direclty to get address. It should set address on desired requested CV if I not wrong. ( I never use it to set them I more confortable using ESU soft for my decoders or DECODER PRO)

I have forget that your lib offered CV direct mode only so why i should have such results on my tests! ( making feedback address)

I have another projet for a signal decoder as accessory decoder for wicth one direct mode should be enough. ( less CV to set than a mobile)

Anyway it s sure that for a function decoder ( mobile) CV by CV is a bit too limited mode but shul be consider as a minimum

INDEX address mode should be a good way to support with latest decoder and programmers.
But i think some other priority ways can be implemented first ( multiple address level ( coach level vs train level for exemple), consist mode for UM mode, analogic/digital mode switch( made basicly on my test code) railcom feedback, ...?)

Now i need to identify the cv value received, manage it to update in eeprom and make the reset to load change on my code!

Laurent

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Hi Aiko

Hope you dont burn brain tto much like i did! I finaly fixed the+1 swap with appropriate recoding cv_operation function as follow.

So now all test done on LH100 match perfectly:

`

void cv_operation(const uint8_t op_mode)
{
  // SM:  op_mode = 1 as defined in CONSTANTS
  // PoM: op_mode = 2 as defined in CONSTANTS

  uint16_t RecCvNumber = cvCmd.number; // CV received
  uint8_t RecCvData = cvCmd.value; // Value received
  uint8_t CurrentEEPROMValue = cvValues.read(RecCvNumber); //existing curent value in eeprom

  #ifdef DEBUG_CV 
    Serial.print("Received CV Number: ");
    Serial.println(cvCmd.number);
    Serial.print("Received CV Value: ");
    Serial.println(cvCmd.value);
  #endif

  // Ensure we stay within the CV array bounds
  if (RecCvNumber < sizeof(myCvs)) //EEPROM_SIZE_USED
  {
    switch(cvCmd.operation)
    {
      case CvAccess::verifyByte :
        if (CurrentEEPROMValue == RecCvData)		
        {
          // In SM we send back a DCC-ACK signal, in PoM mode a railcom reply (not implemented)
          if (op_mode == SM)
          {                       
            dcc.sendAck();                        
          }
        }
        
      break;

      case CvAccess::writeByte :
          // A number of CVs have a special meaning, and can not directly be written   so use CV class write process       
          if (op_mode == SM)
          {
            dcc.sendAck(); //here to avoir ERROR2 default on swap cv
          }
          
          cvValues.write(RecCvNumber, RecCvData); //UPDATE VALUE ACCORDING CV STATUS READ ONLY, WRITABLE, BOTH

          if (op_mode == SM)
          {
            dcc.sendAck(); // ack change performed
            processor.reboot(); //to keep in charge new CV value at boot, really fast re load like a light flash!           
          }
         
          
        
        break;

      case CvAccess::bitManipulation :
        
        if (cvCmd.writecmd)  //WRITE
        {         
          uint8_t NewEEPROMValue = cvCmd.writeBit(CurrentEEPROMValue);
          cvValues.write(RecCvNumber, NewEEPROMValue);          
          if (op_mode == SM)
          {
            dcc.sendAck();            
          }
        }
        else  //READ
        {
          // verify if bits are equal
          if (cvCmd.verifyBit(CurrentEEPROMValue)) 
          {
              if (SM)
              {
                  dcc.sendAck();
              }
          }

        }
          
      break;
  
      default:
      break;

    }
  }
  
}

`

Please not i made a sanity check before update in the CV value class like it according NMRA value + some personnal uses on CV112 to CV119:

`

//*****************************************************************************************************
// Read and Write
//*****************************************************************************************************
uint8_t CvValues::read(uint16_t number) 
{
  return EEPROM.read(number);
}

void CvValues::write(uint16_t number, uint8_t value) 
{
  // Make a basic sanity check regarding the value/number  that is entered!

  //EEPROM.update(number, value); //this is the update EEPROM instruction to perfomr if clear conditions get.

  //number is into 0 and the MAX EEPROM SIZE PLACE ex 256 bytes
  // in that case NUMBER can not be > 256
  // so need to marmalise it

  if (number < EEPROM.length() )
  //if(number <= 256)
  {
  
    switch (number)
    {
          //READ ONLY or special value requirement or not permited cases:
          case 0: //nothing to set on adress CV0 for users CV not existing!
          // nothing;
          break;
      
          case 1: //CV_1: normlised values:
              // CV_1 => Value = 0 is not allowed and values over 127 are not autorized so exit on such condition and dont process any update.
              if (value == 0 || value > 127)
        {
          break;
        }
        else
        {
          EEPROM.update(number, value);
        }
        break;
          
          case 7: //CV_7: READ ONLY
              // Read only (CV_7 - Version no.)
              break;
        
          case 8: //CV_8 READ ONLY but can process a default value loading on one condition:
              // Read only (CV_8 - Manufacturer ID)
              // Reset all CVs to defaults if Value = 8)
              if (value == 8)
              {
                //load defaults values: 
                setDefaults();			
              }            
              break;
          
          // CV_17 must have a value between 11000000->(192dec) and 11100111->(231dec) inclusive
          // CV_17 == 192 && CV_18 == 0 -> Address = 0 is also not valid and therefore shall not be set
      
          case 17:    //CV_17: normalized
              if ( (value < 192 || value > 231) || (EEPROM.read(17) == 0 && value == 192) )
              {
                break;
              }
              else 
              {	
                EEPROM.update(number, value);
              }
            break;
        
          case 18:    //CV_18: normalized
              if(EEPROM.read(17) == 192 && value == 0)
              {
                break;
              }
              else
              {
                EEPROM.update(number, value);
              }
            break;
        
          case 19:  //consist adress: max value is 127
          // a 0 will not active consist mode
          // bit 7T is the direction travel of consist 0 = normal, 1 = reversed, 
          //address is onmy stored on bit 0..6        
            if ( (value > 0) && (value < 127) )
            {
              EEPROM.update(number, value); //consist mode activated
            }
            else
            {
              EEPROM.update(number, 0); //consit mode unactivated
            }
            break;
          
          case 20: //NMRA RESERVED CV
            break;

          case 26: //NMRA RESERVED CV
            break;
            
              // CV_31 & CV_32 Index high byte isn't implemented and shall not be set
          case 31:    //CV_31
          case 32:    //CV_32
              break;
          
          case 96 ... 104: //NMRA RESERVED CV
            break;

          case 107: //NMRA RESERVED CV
            break;

          case 108: //NMRA RESERVED CV
            break;

          case 109: //NMRA RESERVED CV
            break;
            
          case 110: //NMRA RESERVED CV
            break;
            
          case 111: //NMRA RESERVED CV
            break;

          case 112 ... 119: // REERVED ON THIS DECODER FOR VERSION INFORMATION CPU CODE etc SO IN READ ONLY MODE!!!
            break;  

            
          case 513 ... 879: //NMRA RESERVED CV
            break;
          
          case 880 ... 891: //NMRA RESERVED CV
            break;
          

          // Regular CV write is carried out
          default: //any other value not concerned by read only
              EEPROM.update(number, value);
           break;
          }
  }
}

`

I need again to perform some tests on it.
Anyway swp value for CV looks like OK but observed behavior need optimisation for default cv load by update CV8 with reset value.... not to require a hard reset.

This is the next step to fix!

Regards
Laurent

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Hi,

I did not succeed in fixing reset value process by updating CV8 with a desired value to process a relaod of default value + reboot cpu ( in my exemple set value to 8 on CV8 should make a reset of val)

This made an unknown behavior that required a push hard reset buton.

I made some other tests on others CV in read only without issue, Changing any writable CV is ok too and take in charge.

Anyway absolutly no idea why is not possible with CV8 reset process to default values.
I tried to make a eeprom.update(0,0) = > KO
I used setdefaults() => KO

Any idea?
That 's a bit strange!

Laurent

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Hi Aiko

I missed all my test to reset by CV8 change.

So I have decided to use a more powerfull solution in that case only to perform a "full soft reset" using watchdog option

Tested with sucess applying it to main loop, read cv =>OK, write CV =>oK, apply reset CV (write 8 on CV8 = > OK

Issue fixed.

Anyway I suspected taht a full relaod of CV require may be a register reset or somthing similar, so that s the reason why "a jump to 0" reset option may not be enough or brik the process.

I set watchdog to 1sec that look like a good timing for that timer.

Regards
Laurent

from ap_dcc_library.

LaurentR59 avatar LaurentR59 commented on August 18, 2024

Dear Aiko

About the multimaus I advised you to put a look on that document from Roco.
It deals with firmware version and capability to read write CV and drive outputs.


https://www.z21.eu/media/Kwc_Basic_DownloadTag_Component/116-8882-7660-downloadTag/default/0c5a396b/1654061595/multimaus-firmware-update-v2-00.pdf

Anyway support of XPRESSNET V4.0 is a good improvment although only F29-F31 have been added for the moment ( not up to 68. May be for future updates?)

CV read write process was updated too but require compatible command station.

Laurent

from ap_dcc_library.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.