What's the equivalence in seconds for nTimeout?

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

What's the equivalence in seconds for nTimeout?

Post by Carmen Garcia »

Hello everybody:

In ZigBee's Macro "Receive_Char" is used the input paramenter "nTimeout" that's not means seconds (time), it means how much munber of retries to check for a response...

¿Does anyone know the equivalence between this retries and the seconds between them?

Thanks you very much in advanced.

Regards
Carmen Garcia

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by kersing »

Answer for Flowcode 5:
Each try of nTimeout is 1000 microseconds. Value 255 is a special (wait forever) value.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by Carmen Garcia »

:shock: :shock: :shock: :shock: :shock: :shock: Guau¡¡¡¡ Where was this data??

Thank you very very much¡¡

Regards
Carmen Garcia

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by kersing »

I checked the component sources.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by Carmen Garcia »

:shock: :shock: :shock: :shock: :shock:
Carmen Garcia

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by dazz »

Hi Carmen
if you add a zigbee component right click it ,click help and its in the helpfile that pops up
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by Carmen Garcia »

Hi Dazz:

I was looking for this information throught this way and doesn't appear anything like this...My FlowCode version is 5 too.

:?: :?:

Thanks you very much
Regards
Carmen Garcia

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by dazz »

Hi Carmen

see attached pic ,not sure if you were looking at the correct help file
1 right click select help
2 click the 3 dots opposite help
3 line explaining ntimeout

Regards
Dazz
Attachments
Untitled.jpg
(746.64 KiB) Downloaded 3525 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by dazz »

kersing wrote:Answer for Flowcode 5:
Each try of nTimeout is 1000 microseconds. Value 255 is a special (wait forever) value.
Hi Jaq

I thought it was 100us as per the uart. cal file

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by Carmen Garcia »

Thanks you very much for the picture :D :D :D
This is the flow I followed...but the UART.cal file is the key for solve my doubt.

How do you view to this file?

Thanks you very much again.

Regards
Carmen Garcia

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by kersing »

dazz wrote:I thought it was 100us as per the uart. cal file
Dazz,

The way I read the code is:
In the code of FC_CAL_UART_Receive there is a loop (rxStatus == UART_STATUS_LOOP) that waits 10us, increments delay1 and only if delay1 equals 100, nTimeout is decremented.
That makes 100 times 10 us = 1000 us delay for each decrement of nTimeout.

Regards,

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by kersing »

Carmen Garcia wrote: How do you view to this file?
Use your favorite editor to open c:\Program Files\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c (for 64 bit systems it is c:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: What's the equivalence in seconds for nTimeout?

Post by dazz »

Hi Jac
cheers i missed the loop

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Post Reply