System Time Update using IRIG | | |
Hi,
I am updating system time with IRIG time source which sends irregular
pulses as shown below
11000011111100111111111111111111....(1-IRIG present and 0-IRIG not
present)
I need to update system time when I find a steady pulse or a series of
1's say for a span of 10-15 seconds. Is there a way to implement this
in VB6?
Thanks in advance.
Valiz. | | | | re: System Time Update using IRIG
"Valiz" <deva8601@uidaho.edu> wrote in message
news:eb2f895.0403181042.712cad98@posting.google.co m...[color=blue]
> Hi,
> I am updating system time with IRIG time source which sends irregular
> pulses as shown below
> 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not
> present)
> I need to update system time when I find a steady pulse or a series of
> 1's say for a span of 10-15 seconds. Is there a way to implement this
> in VB6?
> Thanks in advance.
> Valiz.[/color]
Of course it is doable.
How are you getting the info (serial I/O, WAN. etc.) and which IRIG
(A,B,E,H)? | | | | re: System Time Update using IRIG
"Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message news:<app6c.30689$Eg3.17482@nwrdny01.gnilink.net>. ..[color=blue]
> "Valiz" <deva8601@uidaho.edu> wrote in message
> news:eb2f895.0403181042.712cad98@posting.google.co m...[color=green]
> > Hi,
> > I am updating system time with IRIG time source which sends irregular
> > pulses as shown below
> > 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not
> > present)
> > I need to update system time when I find a steady pulse or a series of
> > 1's say for a span of 10-15 seconds. Is there a way to implement this
> > in VB6?
> > Thanks in advance.
> > Valiz.[/color]
>
> Of course it is doable.
> How are you getting the info (serial I/O, WAN. etc.) and which IRIG
> (A,B,E,H)?[/color]
I am using Serial - Com port 17 - Using SaxComm8 OCX and the signal is IRIG-B.
Valiz. | | | | re: System Time Update using IRIG
"Valiz" <deva8601@uidaho.edu> wrote in message
news:eb2f895.0403190724.4773fc41@posting.google.co m...[color=blue]
> "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color]
news:<app6c.30689$Eg3.17482@nwrdny01.gnilink.net>. ..[color=blue][color=green]
> > "Valiz" <deva8601@uidaho.edu> wrote in message
> > news:eb2f895.0403181042.712cad98@posting.google.co m...[color=darkred]
> > > Hi,
> > > I am updating system time with IRIG time source which sends irregular
> > > pulses as shown below
> > > 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not
> > > present)
> > > I need to update system time when I find a steady pulse or a series of
> > > 1's say for a span of 10-15 seconds. Is there a way to implement this
> > > in VB6?
> > > Thanks in advance.
> > > Valiz.[/color]
> >
> > Of course it is doable.
> > How are you getting the info (serial I/O, WAN. etc.) and which IRIG
> > (A,B,E,H)?[/color]
>
> I am using Serial - Com port 17 - Using SaxComm8 OCX and the signal is[/color]
IRIG-B.[color=blue]
> Valiz.[/color]
OK.. I wasn't sure, your description certainly does not describe IRIG B
since the "IRIG present" is merely a flag in the sixth group (status) and
it's the opposite of what you have ( 0 = present, 1= not present).
I am not familiar with SaxComm8 ocx but if it can handle the speed required
(IRIG B pulse code consist of one frame with 100 elements.and it all comes
within one second per frame with 10 ms for each element.)
Basically I would read it from the buffer and decode it (first element is
seconds, second is minutes, third is hours, fourth is days, etc. etc.)
If you're interested, I have some docs outlining the detail of IRIG packets.
If you want just send me your e-mail address and I'll send it your way. | | | | re: System Time Update using IRIG
"Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message news:<asP6c.472$GT2.373@nwrdny01.gnilink.net>...[color=blue]
> "Valiz" <deva8601@uidaho.edu> wrote in message
> news:eb2f895.0403190724.4773fc41@posting.google.co m...[color=green]
> > "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color]
> news:<app6c.30689$Eg3.17482@nwrdny01.gnilink.net>. ..[color=green][color=darkred]
> > > "Valiz" <deva8601@uidaho.edu> wrote in message
> > > news:eb2f895.0403181042.712cad98@posting.google.co m...
> > > > Hi,
> > > > I am updating system time with IRIG time source which sends irregular
> > > > pulses as shown below
> > > > 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not
> > > > present)
> > > > I need to update system time when I find a steady pulse or a series of
> > > > 1's say for a span of 10-15 seconds. Is there a way to implement this
> > > > in VB6?
> > > > Thanks in advance.
> > > > Valiz.
> > >
> > > Of course it is doable.
> > > How are you getting the info (serial I/O, WAN. etc.) and which IRIG
> > > (A,B,E,H)?[/color]
> >
> > I am using Serial - Com port 17 - Using SaxComm8 OCX and the signal is[/color]
> IRIG-B.[color=green]
> > Valiz.[/color]
>
> OK.. I wasn't sure, your description certainly does not describe IRIG B
> since the "IRIG present" is merely a flag in the sixth group (status) and
> it's the opposite of what you have ( 0 = present, 1= not present).
>
> I am not familiar with SaxComm8 ocx but if it can handle the speed required
> (IRIG B pulse code consist of one frame with 100 elements.and it all comes
> within one second per frame with 10 ms for each element.)
>
> Basically I would read it from the buffer and decode it (first element is
> seconds, second is minutes, third is hours, fourth is days, etc. etc.)
>
> If you're interested, I have some docs outlining the detail of IRIG packets.
> If you want just send me your e-mail address and I'll send it your way.[/color]
Thanks for getting back. At this point I am able to decode the signal
and get the required data but the point is I would like to make sure
it is a series of 1's at the time when I decode. Say, if I want to
update the clock every 10 minutes or say even 10 seconds. I want to
make sure I don't fall on a "0" every time I hit 10 seconds. Any
ideas?
Thanks,
Valiz. | | | | re: System Time Update using IRIG
"Valiz" <deva8601@uidaho.edu> wrote in message
news:eb2f895.0403220700.f65cde2@posting.google.com ...[color=blue]
> "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color]
news:<asP6c.472$GT2.373@nwrdny01.gnilink.net>...[color=blue][color=green]
> > "Valiz" <deva8601@uidaho.edu> wrote in message
> > news:eb2f895.0403190724.4773fc41@posting.google.co m...[color=darkred]
> > > "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color]
> > news:<app6c.30689$Eg3.17482@nwrdny01.gnilink.net>. ..[color=darkred]
> > > > "Valiz" <deva8601@uidaho.edu> wrote in message
> > > > news:eb2f895.0403181042.712cad98@posting.google.co m...
> > > > > Hi,
> > > > > I am updating system time with IRIG time source which sends[/color][/color][/color]
irregular[color=blue][color=green][color=darkred]
> > > > > pulses as shown below
> > > > > 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not
> > > > > present)
> > > > > I need to update system time when I find a steady pulse or a[/color][/color][/color]
series of[color=blue][color=green][color=darkred]
> > > > > 1's say for a span of 10-15 seconds. Is there a way to implement[/color][/color][/color]
this[color=blue][color=green][color=darkred]
> > > > > in VB6?
> > > > > Thanks in advance.
> > > > > Valiz.
> > > >
> > > > Of course it is doable.
> > > > How are you getting the info (serial I/O, WAN. etc.) and which IRIG
> > > > (A,B,E,H)?
> > >
> > > I am using Serial - Com port 17 - Using SaxComm8 OCX and the signal is[/color]
> > IRIG-B.[color=darkred]
> > > Valiz.[/color]
> >
> > OK.. I wasn't sure, your description certainly does not describe IRIG B
> > since the "IRIG present" is merely a flag in the sixth group (status)[/color][/color]
and[color=blue][color=green]
> > it's the opposite of what you have ( 0 = present, 1= not present).
> >
> > I am not familiar with SaxComm8 ocx but if it can handle the speed[/color][/color]
required[color=blue][color=green]
> > (IRIG B pulse code consist of one frame with 100 elements.and it all[/color][/color]
comes[color=blue][color=green]
> > within one second per frame with 10 ms for each element.)
> >
> > Basically I would read it from the buffer and decode it (first element[/color][/color]
is[color=blue][color=green]
> > seconds, second is minutes, third is hours, fourth is days, etc. etc.)
> >
> > If you're interested, I have some docs outlining the detail of IRIG[/color][/color]
packets.[color=blue][color=green]
> > If you want just send me your e-mail address and I'll send it your way.[/color]
>
> Thanks for getting back. At this point I am able to decode the signal
> and get the required data but the point is I would like to make sure
> it is a series of 1's at the time when I decode. Say, if I want to
> update the clock every 10 minutes or say even 10 seconds. I want to
> make sure I don't fall on a "0" every time I hit 10 seconds. Any
> ideas?
> Thanks,
> Valiz.[/color]
A time code frame begins with a reference marker (this should be your goal).
When you need a time reference I suggest you poll for at least 10 seconds
looking for reference marker. You can also look for a known variable, for
example the days or days * 100. When you find this bit combination, do a
validation check by checking the previous or next word to ensure that it is
not by chance the bit combination exist. If you're polling satellite, you
need to make sure you have the receiver locked to at least one satellite
(status "0").
I'm not sure about the question, if the question is how do you test a
certain bit, here is a function that will help you do that:
' Test bit position "bit" in the value "InByte"
' returns true / false
Private Function TestBit(ByVal InByte As Byte, ByVal bit As Integer) As
Boolean
If bit >= 0 And bit <= 7 Then
TestBit = ((InByte And (2 ^ bit)) > 0)
End If
End Function | | | | re: System Time Update using IRIG
"Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message news:<TfO7c.520$7F.214@nwrdny03.gnilink.net>...[color=blue]
> "Valiz" <deva8601@uidaho.edu> wrote in message
> news:eb2f895.0403220700.f65cde2@posting.google.com ...[color=green]
> > "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color]
> news:<asP6c.472$GT2.373@nwrdny01.gnilink.net>...[color=green][color=darkred]
> > > "Valiz" <deva8601@uidaho.edu> wrote in message
> > > news:eb2f895.0403190724.4773fc41@posting.google.co m...
> > > > "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color][/color]
> news:<app6c.30689$Eg3.17482@nwrdny01.gnilink.net>. ..[color=green][color=darkred]
> > > > > "Valiz" <deva8601@uidaho.edu> wrote in message
> > > > > news:eb2f895.0403181042.712cad98@posting.google.co m...
> > > > > > Hi,
> > > > > > I am updating system time with IRIG time source which sends[/color][/color]
> irregular[color=green][color=darkred]
> > > > > > pulses as shown below
> > > > > > 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not
> > > > > > present)
> > > > > > I need to update system time when I find a steady pulse or a[/color][/color]
> series of[color=green][color=darkred]
> > > > > > 1's say for a span of 10-15 seconds. Is there a way to implement[/color][/color]
> this[color=green][color=darkred]
> > > > > > in VB6?
> > > > > > Thanks in advance.
> > > > > > Valiz.
> > > > >
> > > > > Of course it is doable.
> > > > > How are you getting the info (serial I/O, WAN. etc.) and which IRIG
> > > > > (A,B,E,H)?
> > > >
> > > > I am using Serial - Com port 17 - Using SaxComm8 OCX and the signal is[/color][/color]
> IRIG-B.[color=green][color=darkred]
> > > > Valiz.
> > >
> > > OK.. I wasn't sure, your description certainly does not describe IRIG B
> > > since the "IRIG present" is merely a flag in the sixth group (status)[/color][/color]
> and[color=green][color=darkred]
> > > it's the opposite of what you have ( 0 = present, 1= not present).
> > >
> > > I am not familiar with SaxComm8 ocx but if it can handle the speed[/color][/color]
> required[color=green][color=darkred]
> > > (IRIG B pulse code consist of one frame with 100 elements.and it all[/color][/color]
> comes[color=green][color=darkred]
> > > within one second per frame with 10 ms for each element.)
> > >
> > > Basically I would read it from the buffer and decode it (first element[/color][/color]
> is[color=green][color=darkred]
> > > seconds, second is minutes, third is hours, fourth is days, etc. etc.)
> > >
> > > If you're interested, I have some docs outlining the detail of IRIG[/color][/color]
> packets.[color=green][color=darkred]
> > > If you want just send me your e-mail address and I'll send it your way.[/color]
> >
> > Thanks for getting back. At this point I am able to decode the signal
> > and get the required data but the point is I would like to make sure
> > it is a series of 1's at the time when I decode. Say, if I want to
> > update the clock every 10 minutes or say even 10 seconds. I want to
> > make sure I don't fall on a "0" every time I hit 10 seconds. Any
> > ideas?
> > Thanks,
> > Valiz.[/color]
>
> A time code frame begins with a reference marker (this should be your goal).
> When you need a time reference I suggest you poll for at least 10 seconds
> looking for reference marker. You can also look for a known variable, for
> example the days or days * 100. When you find this bit combination, do a
> validation check by checking the previous or next word to ensure that it is
> not by chance the bit combination exist. If you're polling satellite, you
> need to make sure you have the receiver locked to at least one satellite
> (status "0").
>
> I'm not sure about the question, if the question is how do you test a
> certain bit, here is a function that will help you do that:
>
> ' Test bit position "bit" in the value "InByte"
> ' returns true / false
>
> Private Function TestBit(ByVal InByte As Byte, ByVal bit As Integer) As
> Boolean
> If bit >= 0 And bit <= 7 Then
> TestBit = ((InByte And (2 ^ bit)) > 0)
> End If
> End Function[/color]
Thanks for the info. I am sorry for not being clear with the question.
I am looking at the Time Quality bit (every second) in the IRIG-B
signal and it shuffles or toggles back and forth (0 and 1)randomly and
there's no regularity whatsoever. If it is a "1", an embedded
microcontroller (Atmel) takes in the signal and from there I update my
system clock. And, if it is a "0" I need to write system time to the
microcontroller (which serves as clock for some other serially
connected devices). My primary concern is that every time I use a
timer say for 10 seconds to update the system clock, I do not want to
hit a "0" for every cycle. Although it does not hit every time, there
is certainly a possibility that I might hit "0". Hence, am looking for
a method to eliminate that possibility, like for example a sliding
window that keeps checking for the Time Quality bit status or
something like that.
Thanks again for the info.
Valiz. | | | | re: System Time Update using IRIG
"Valiz" <deva8601@uidaho.edu> wrote in message
news:eb2f895.0403230743.4dc19dc@posting.google.com ...[color=blue]
> "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color]
news:<TfO7c.520$7F.214@nwrdny03.gnilink.net>...[color=blue][color=green]
> > "Valiz" <deva8601@uidaho.edu> wrote in message
> > news:eb2f895.0403220700.f65cde2@posting.google.com ...[color=darkred]
> > > "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color]
> > news:<asP6c.472$GT2.373@nwrdny01.gnilink.net>...[color=darkred]
> > > > "Valiz" <deva8601@uidaho.edu> wrote in message
> > > > news:eb2f895.0403190724.4773fc41@posting.google.co m...
> > > > > "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message[/color]
> > news:<app6c.30689$Eg3.17482@nwrdny01.gnilink.net>. ..[color=darkred]
> > > > > > "Valiz" <deva8601@uidaho.edu> wrote in message
> > > > > > news:eb2f895.0403181042.712cad98@posting.google.co m...
> > > > > > > Hi,
> > > > > > > I am updating system time with IRIG time source which sends[/color]
> > irregular[color=darkred]
> > > > > > > pulses as shown below
> > > > > > > 11000011111100111111111111111111....(1-IRIG present and 0-IRIG[/color][/color][/color]
not[color=blue][color=green][color=darkred]
> > > > > > > present)
> > > > > > > I need to update system time when I find a steady pulse or a[/color]
> > series of[color=darkred]
> > > > > > > 1's say for a span of 10-15 seconds. Is there a way to[/color][/color][/color]
implement[color=blue][color=green]
> > this[color=darkred]
> > > > > > > in VB6?
> > > > > > > Thanks in advance.
> > > > > > > Valiz.
> > > > > >
> > > > > > Of course it is doable.
> > > > > > How are you getting the info (serial I/O, WAN. etc.) and which[/color][/color][/color]
IRIG[color=blue][color=green][color=darkred]
> > > > > > (A,B,E,H)?
> > > > >
> > > > > I am using Serial - Com port 17 - Using SaxComm8 OCX and the[/color][/color][/color]
signal is[color=blue][color=green]
> > IRIG-B.[color=darkred]
> > > > > Valiz.
> > > >
> > > > OK.. I wasn't sure, your description certainly does not describe[/color][/color][/color]
IRIG B[color=blue][color=green][color=darkred]
> > > > since the "IRIG present" is merely a flag in the sixth group[/color][/color][/color]
(status)[color=blue][color=green]
> > and[color=darkred]
> > > > it's the opposite of what you have ( 0 = present, 1= not present).
> > > >
> > > > I am not familiar with SaxComm8 ocx but if it can handle the speed[/color]
> > required[color=darkred]
> > > > (IRIG B pulse code consist of one frame with 100 elements.and it all[/color]
> > comes[color=darkred]
> > > > within one second per frame with 10 ms for each element.)
> > > >
> > > > Basically I would read it from the buffer and decode it (first[/color][/color][/color]
element[color=blue][color=green]
> > is[color=darkred]
> > > > seconds, second is minutes, third is hours, fourth is days, etc.[/color][/color][/color]
etc.)[color=blue][color=green][color=darkred]
> > > >
> > > > If you're interested, I have some docs outlining the detail of IRIG[/color]
> > packets.[color=darkred]
> > > > If you want just send me your e-mail address and I'll send it your[/color][/color][/color]
way.[color=blue][color=green][color=darkred]
> > >
> > > Thanks for getting back. At this point I am able to decode the signal
> > > and get the required data but the point is I would like to make sure
> > > it is a series of 1's at the time when I decode. Say, if I want to
> > > update the clock every 10 minutes or say even 10 seconds. I want to
> > > make sure I don't fall on a "0" every time I hit 10 seconds. Any
> > > ideas?
> > > Thanks,
> > > Valiz.[/color]
> >
> > A time code frame begins with a reference marker (this should be your[/color][/color]
goal).[color=blue][color=green]
> > When you need a time reference I suggest you poll for at least 10[/color][/color]
seconds[color=blue][color=green]
> > looking for reference marker. You can also look for a known variable,[/color][/color]
for[color=blue][color=green]
> > example the days or days * 100. When you find this bit combination, do a
> > validation check by checking the previous or next word to ensure that it[/color][/color]
is[color=blue][color=green]
> > not by chance the bit combination exist. If you're polling satellite,[/color][/color]
you[color=blue][color=green]
> > need to make sure you have the receiver locked to at least one satellite
> > (status "0").
> >
> > I'm not sure about the question, if the question is how do you test a
> > certain bit, here is a function that will help you do that:
> >
> > ' Test bit position "bit" in the value "InByte"
> > ' returns true / false
> >
> > Private Function TestBit(ByVal InByte As Byte, ByVal bit As Integer) As
> > Boolean
> > If bit >= 0 And bit <= 7 Then
> > TestBit = ((InByte And (2 ^ bit)) > 0)
> > End If
> > End Function[/color]
>
> Thanks for the info. I am sorry for not being clear with the question.
> I am looking at the Time Quality bit (every second) in the IRIG-B
> signal and it shuffles or toggles back and forth (0 and 1)randomly and
> there's no regularity whatsoever. If it is a "1", an embedded
> microcontroller (Atmel) takes in the signal and from there I update my
> system clock. And, if it is a "0" I need to write system time to the
> microcontroller (which serves as clock for some other serially
> connected devices). My primary concern is that every time I use a
> timer say for 10 seconds to update the system clock, I do not want to
> hit a "0" for every cycle. Although it does not hit every time, there
> is certainly a possibility that I might hit "0". Hence, am looking for
> a method to eliminate that possibility, like for example a sliding
> window that keeps checking for the Time Quality bit status or
> something like that.
> Thanks again for the info.
> Valiz.[/color]
I am afraid I will have to retreat. In all my years I have never heard an
IRIG-B "Time Quality" bit. I am assuming there is something proprietary
about this data so I don't dare to even guess or suggest what you should do.
However, examining the buffer and testing for certain bits as I have outline
in previous e-mail certainly can be used. Good luck. |  | Similar Visual Basic 4 / 5 / 6 bytes | | | Forums
Visit our community forums for general discussions and latest on Bytes
/bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 231,197 network members.
|