TIC36v4 trouble sending settings commands

Hello Pololu team,
I’ve been trying to configure programmatically the timeout, using the next code based on the table provided by you. It is on C#.

image
image
image

I noticed that the documentation says that the data field is an unsigned integer of 16 bits, yet if I defined like this, calling instead transfer_32bit(), it doesnt work either

image
image

I know that both transfer functions work, I have set limit switches using set_setting_byte, and actioned commands using transfer_32bit. My guess is that settings commands longer than one byte must be handle different, and therefore I would like to hear your pov.

Thanks in advance.

Hello.

The “Set settings” command only sets a single byte of a setting, and the timeout value is a 16-bit value, so it takes two bytes. Also, when setting the offsets, please note that the Tic uses little-endian for storing its settings.

Brandon

Hi Brandon, yes, I notice that, that’s why I tried using the transfer_32bit method, following the next data format


Yet no timeout was updated. Could you elaborate on how to send settings commands that require a longer value ?

Each command has a specific way to encode it, so you have to use the proper encoding for the “Set setting” command (32-bit write encoding will not work).

You will need to send two “Set setting” commands, one for each byte of the unsigned 16-bit value. Since it uses little-endian formating, the least significant byte needs to come first (i.e. for the “Command timeout” setting, the low byte should use an offset of 0x09 and the high byte should use 0x0A).

Brandon

Hi Brandon, thank you so much for your help, I was able to set the value correctly following your instructions.
I’ll leave the code I used in case anyone is on the same trouble as I was

1 Like

I am glad you were able to get it working! Thank you for letting us know and sharing your code.

Brandon