HI from another new UK user: MERG RPC support

New users can introduce themself here

Re: HI from another new UK user: MERG RPC support

Postby Dagworth » 25.11.2017, 00:12

New USB adaptor arrived this morning, FTDI based as recommended.

My test panel is now behaving quite happily except on thing, a small but noticeable lag when changing aspects on a three aspect signal, red goes out some time before the next aspect lights. Is it possible to speed up the refresh rate on the RPIC?

Andi
Dagworth
 

Re: HI from another new UK user: MERG RPC support

Postby rjversluis » 25.11.2017, 07:11

Hi Andi,

the refresh is now 10 times within a second.
How fast would you suggest? 100 times?
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: HI from another new UK user: MERG RPC support

Postby Dagworth » 25.11.2017, 09:02

rjversluis wrote:Hi Andi,

the refresh is now 10 times within a second.
How fast would you suggest? 100 times?



Looking at the tech spec for the RPIC it would seem that, at 9600 baud, the maximum it can deal with for 70 bytes of data is 13 times a second.

Maybe the lag is a software thing rather than communication. I will have a look at the byte trace later, off to Warley at the moment.

Andi
Dagworth
 

Re: HI from another new UK user: MERG RPC support

Postby rjversluis » 25.11.2017, 10:04

Andi,

now there is a pause of 100ms in the refresh cycle.
I reduced it to 10ms because the communication itself uses the most of the cycle time.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: HI from another new UK user: MERG RPC support

Postby Dagworth » 27.11.2017, 19:49

rjversluis wrote:Andi,

now there is a pause of 100ms in the refresh cycle.
I reduced it to 10ms because the communication itself uses the most of the cycle time.


All working perfectly now, thank you.

Possibly simple question, possibly not: When I start Rocrail server and then Rocview my outputs don't come live until they are changed. Is there a way to get it to send all data straight away?

Andi
Dagworth
 

Re: HI from another new UK user: MERG RPC support

Postby rjversluis » 27.11.2017, 20:16

Dagworth wrote:Possibly simple question, possibly not: When I start Rocrail server and then Rocview my outputs don't come live until they are changed. Is there a way to get it to send all data straight away?

depends on what kind of Rocrail objects you have used for the outputs.
Maybe SoD is what you are looking for.
Normally the hardware system is responsible for restoring output state.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: HI from another new UK user: MERG RPC support

Postby Dagworth » 27.11.2017, 23:26

rjversluis wrote:
Dagworth wrote:Possibly simple question, possibly not: When I start Rocrail server and then Rocview my outputs don't come live until they are changed. Is there a way to get it to send all data straight away?

depends on what kind of Rocrail objects you have used for the outputs.
Maybe SoD is what you are looking for.
Normally the hardware system is responsible for restoring output state.

The SoD routine is working for turnouts, but not for signals, they stay dark until I manually trigger them to do something else.

RPC outputs will simply obey the bytes it is sent with no memory of previous events. At start-up Rocrail is sending Zero bytes until told to do otherwise.

Andi
Dagworth
 

Re: HI from another new UK user: MERG RPC support

Postby rjversluis » 28.11.2017, 08:01

Andi,
Dagworth wrote:The SoD routine is working for turnouts, but not for signals, they stay dark until I manually trigger them to do something else.

thats not correct: Signals are also initialised.

But I just added a function to save and restore the 32 bytes of output in the rpic library.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Previous

Return to Introduction