Discussion and technical support related to USRP, UHD, RFNoC
View all threadsIn the attachment, this is rxtime.grc.
We use it to display the time of tags of received signal, and this is USRP's time?
In result.png, there is
Offset: 0 Source: gr uhd usrp source1 Key: rx_time Value: {0 0.956504}
We can not understand it, what is it?
If we want to get the time is 141757.00(UTC time or GPS time), how can we do?
As detailed as possible, thank you!
Hope this helps.
Offset : 0 indicates the first sample output by the USRP source
Key : “rx_time” is the tag key identifying it as a receive time tag
Value : {0, 0,956504} is the time value from the SDR associated with the USRP source. The time is 0.956504 seconds and is derived from the SDR’s internal clock.
You can either determine the host’s time and use rx_time as the initial offset (i.e., add the two together) and then count samples and calculate the sample time based on the sample rate.
Or you can set the SDR’s time. That will require either modifying the USRP source block code to accept a UHD set time command via the control port, syncing to the PC’s time, or creating a block that can access the USRP source block at runtime to set the time, or modifying the generated python for the flowgraph to set time. There are various emails on the list describing some of those approaches.
There is no (AFAIK) “easy” way to set the time to UTC or some other value.
Good luck,
steven
Steven Knudsen, Ph.D., P.Eng.
www. techconficio.ca
www.linkedin.com/in/knudstevenknudsen
Von einem gewissen Punkt an gibt es keine Rückkehr mehr. Dieser Punkt ist zu erreichen. - Franz Kafka
On Nov 16, 2016, at 07:27, zhuimengren via USRP-users usrp-users@lists.ettus.com wrote:
In the attachment, this is rxtime.grc.
We use it to display the time of tags of received signal, and this is USRP's time?
In result.png, there is
Offset: 0 Source: gr uhd usrp source1 Key: rx_time Value: {0 0.956504}
We can not understand it, what is it?
If we want to get the time is 141757.00(UTC time or GPS time), how can we do?<result.png>
As detailed as possible, thank you!
<rxtime.grc><result.png>_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
Hello list,
I think this is an interesting topic as it underlines an issue I've been
having since the commit f4f3ce2550aba933b5f4d310d82a42a41ce3f6a1 has been
in place (about a year and a half now) 1.
Before that commit, when we set the clock source and time source to GPSDO
in GRC, the USRP would use the GPS time as its internal time. Since that
commit has been put in place, we need to do some things that I consider to
be a bit hacky in order to set the USRP time to the GPS time.
I consider all the solutions that have been provided to be a bit of a hack
because from a GRC point of view, blocks should just be linked together and
the USRP source/sink blocks parameters (namely time source and clock
source) should provide the required functionality. I'm not saying the
workarounds suggested time and time again on this list and the gnuradio
mailing list are difficult to put in place but they come as being counter
intuitive with respect to the expected behavior.
So what I have been doing so far is to revert the above mentioned commit on
top of new releases of UHD and it works as I expect it to.
This message might be more suited to the gnuradio mailing list.
Regards,
Jawad
2016-11-16 17:20 GMT+01:00 Steven Knudsen via USRP-users <
usrp-users@lists.ettus.com>:
Hope this helps.
Offset : 0 indicates the first sample output by the USRP source
Key : “rx_time” is the tag key identifying it as a receive time tag
Value : {0, 0,956504} is the time value from the SDR associated with the
USRP source. The time is 0.956504 seconds and is derived from the SDR’s
internal clock.
You can either determine the host’s time and use rx_time as the initial
offset (i.e., add the two together) and then count samples and calculate
the sample time based on the sample rate.
Or you can set the SDR’s time. That will require either modifying the USRP
source block code to accept a UHD set time command via the control port,
syncing to the PC’s time, or creating a block that can access the USRP
source block at runtime to set the time, or modifying the generated python
for the flowgraph to set time. There are various emails on the list
describing some of those approaches.
There is no (AFAIK) “easy” way to set the time to UTC or some other value.
Good luck,
steven
Steven Knudsen, Ph.D., P.Eng.
www. techconficio.ca
www.linkedin.com/in/knudstevenknudsen
Von einem gewissen Punkt an gibt es keine Rückkehr mehr. Dieser Punkt ist
zu erreichen. - Franz Kafka
On Nov 16, 2016, at 07:27, zhuimengren via USRP-users <
usrp-users@lists.ettus.com> wrote:
In the attachment, this is rxtime.grc.
We use it to display the time of tags of received signal, and this is
USRP's time?
In result.png, there is
Offset: 0 Source: gr uhd usrp source1 Key: rx_time Value: {0
0.956504}
We can not understand it, what is it?
If we want to get the time is 141757.00(UTC time or GPS time), how can we
do?<result.png>
As detailed as possible, thank you!
<rxtime.grc><result.png>_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
I totally agree with the “hackiness” aspect. The solutions I suggest and have implemented both suffer from “bad programming”. That is, there are dependencies introduced that are possibly impacted by future changes to GNU radio, or you end up hacking generated python (which defeats the purpose of GR, IMHO), or you are “cheating” by knowing a USRP block reference that you use in your own OOT. The latter is also a problem if, I think, you have more than one USRP attached.
If I could suggest a change to the USRP block, I’d add a second sync to PC option that is “PC + 1 PPS”. Then I’d take my current approach, which is to loop on PC time until the fractional part is < 100 ms, then use set unknown PPS with the appropriate whole seconds value (2 seconds in the future).
Just a suggestion… comments? Slap-down???
thanks,
steven
Steven Knudsen, Ph.D., P.Eng.
www. techconficio.ca
www.linkedin.com/in/knudstevenknudsen
Der entscheidende Augenblick der menschlichen Entwicklung ist immerwährend. Darum sind die revolutionären geistigen Bewegungen, welche alles Frühere für nichtig erklären, im Recht, denn es ist noch nichts geschehen. - Franz Kafka
On Nov 17, 2016, at 01:19, Jawad Seddar via USRP-users usrp-users@lists.ettus.com wrote:
Hello list,
I think this is an interesting topic as it underlines an issue I've been having since the commit f4f3ce2550aba933b5f4d310d82a42a41ce3f6a1 has been in place (about a year and a half now) [1].
Before that commit, when we set the clock source and time source to GPSDO in GRC, the USRP would use the GPS time as its internal time. Since that commit has been put in place, we need to do some things that I consider to be a bit hacky in order to set the USRP time to the GPS time.
I consider all the solutions that have been provided to be a bit of a hack because from a GRC point of view, blocks should just be linked together and the USRP source/sink blocks parameters (namely time source and clock source) should provide the required functionality. I'm not saying the workarounds suggested time and time again on this list and the gnuradio mailing list are difficult to put in place but they come as being counter intuitive with respect to the expected behavior.
So what I have been doing so far is to revert the above mentioned commit on top of new releases of UHD and it works as I expect it to.
This message might be more suited to the gnuradio mailing list.
[1]: https://github.com/EttusResearch/uhd/commit/f4f3ce2550aba933b5f4d310d82a42a41ce3f6a1 https://github.com/EttusResearch/uhd/commit/f4f3ce2550aba933b5f4d310d82a42a41ce3f6a1
Regards,
Jawad
2016-11-16 17:20 GMT+01:00 Steven Knudsen via USRP-users <usrp-users@lists.ettus.com mailto:usrp-users@lists.ettus.com>:
Hope this helps.
Offset : 0 indicates the first sample output by the USRP source
Key : “rx_time” is the tag key identifying it as a receive time tag
Value : {0, 0,956504} is the time value from the SDR associated with the USRP source. The time is 0.956504 seconds and is derived from the SDR’s internal clock.
You can either determine the host’s time and use rx_time as the initial offset (i.e., add the two together) and then count samples and calculate the sample time based on the sample rate.
Or you can set the SDR’s time. That will require either modifying the USRP source block code to accept a UHD set time command via the control port, syncing to the PC’s time, or creating a block that can access the USRP source block at runtime to set the time, or modifying the generated python for the flowgraph to set time. There are various emails on the list describing some of those approaches.
There is no (AFAIK) “easy” way to set the time to UTC or some other value.
Good luck,
steven
Steven Knudsen, Ph.D., P.Eng.
www. techconficio.ca http://techconficio.ca/
www.linkedin.com/in/knudstevenknudsen http://www.linkedin.com/in/knudstevenknudsen
Von einem gewissen Punkt an gibt es keine Rückkehr mehr. Dieser Punkt ist zu erreichen. - Franz Kafka
On Nov 16, 2016, at 07:27, zhuimengren via USRP-users <usrp-users@lists.ettus.com mailto:usrp-users@lists.ettus.com> wrote:
In the attachment, this is rxtime.grc.
We use it to display the time of tags of received signal, and this is USRP's time?
In result.png, there is
Offset: 0 Source: gr uhd usrp source1 Key: rx_time Value: {0 0.956504}
We can not understand it, what is it?
If we want to get the time is 141757.00(UTC time or GPS time), how can we do?<result.png>
As detailed as possible, thank you!
<rxtime.grc><result.png>_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com mailto:USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
USRP-users mailing list
USRP-users@lists.ettus.com mailto:USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com