Abstract:
A G-code decoder is coupled to a video tape recorder. When the G-code decoder detects that at least a portion of a G-code will be received or has been received, it checks whether a time clock has been set. If the time-setting is confirmed, the decoder decodes the G-code and terminates the decoding by a terminating means, and, if the time clock is found not to have been set, the decoder indicates the fact at least and terminates the G-code decoding.

Description:
FIELD OF THE INVENTION 
     The present invention relates to a G-code decoder coupled to a video tape recorder (VTR), which is capable of decoding a G-code, and a method for the same, especially for entering the time-setting mode automatically when the G-code is to be decoded while the time is not yet set in the clock. 
     BACKGROUND OF THE INVENTION 
     In recent years, television receivers having VTRs, e.g., video cartridge recorders (VCRs), attached to them, sometimes built-in, and provided with means to decode a G-code, are becoming popular. 
     A G-code is a line of numerals formed by coding the year, month, day and the time of beginning and ending of a television program. If the G-code of a program is inputted in the apparatus, the code is decoded by the apparatus to begin and end the operation of the apparatus at the desired times. 
     According to the conventional G-code decoding process, the data is decoded based on the data and time held by the clock inside the apparatus, and, if the time is not set by the operator, decoding is based on a default value to output the data. For example, decoding is performed according to the time system having AM0:00 Jan. 1, 2000 as its staring time. 
     However, with such a conventional structure, if the time set by the operator or the default value is not known, so that the decoded data is based on the incorrect time, different data other than that desired is outputted and the desired program is not recorded. 
     The user could not be informed of the situation of time setting which might lead to incorrect decoding. 
     SUMMARY OF THE INVENTION 
     It is a goal of the present invention to overcome the above problem, and provide a television receiver having a VCR which tells the operator that the time is not yet set and asks the operator to set the present time. 
     A G-code decoder of a first exemplary embodiment for attaining the above objects according to the present invention is provided with a G-code decoding means comprising: 
     a detecting means to detect the depression of the G-code input key, 
     a judging means to judge, after the detection, the setting state of the clock to determine whether the time is set, 
     a G-code decoding means to decode the G-code when, by said judging means, setting of the time is affirmed, 
     a terminating means to terminate the decoding process, when the G-code decoding is over, or when the judging means judges that the present time is not set. 
     In addition to the above embodiment, a warning means can be provided to warn by a sound or a synthesized voice, when the judging means judges the time has not been set. 
     A G-code decoder of a second exemplary embodiment for attaining the above objects according to the present invention is provided with a G-code decoding means comprising: 
     a detecting means to detect the depression of the G-code input key; 
     a judging means to judge, after the detection, the setting state of the clock to determine whether the time is set or not; 
     a decoder to decode the G-code, when the setting of the time is affirmed; 
     a time-setting means to indicate the non-setting of the time and request the setting of the time when the non-setting is judged by the judging means; and 
     a terminating means to escape from the decoding process after the decoding or the setting of the time. 
     In addition to this structure, a warning means can be provided to warn by a sound or a synthesized voice, in addition to or instead of the indication, when the judging means judges the time has not been set. 
     Further, means are also provided to permit one to set the present time in the time-setting means. 
     A first exemplary method of decoding a G-code for attaining the above objects according to the present invention comprises the steps of: 
     detecting the depression of the G-code input key; 
     judging the setting state of the clock to determine whether the time is set; 
     decoding the G-code, when, by the step of judging, setting of the time is affirmed; 
     terminating the decoding process, when the G-code decoding is over, or when it is judged that the present time is not set. 
     In addition to this process, a warning step can be provided to warn by a sound or a synthesized voice that the time is not set. 
     A second exemplary method of decoding a G-code for attaining the above objects according to the present invention comprises the steps of: 
     detecting the depression of the G-code input key; 
     judging the setting state of the clock to determine whether the time is set or not; 
     decoding the G-code when the setting of the time is affirmed; 
     indicating the non-setting of the time and requesting the time to be set when the non-setting is judged; and 
     escaping from the process of the decoding after the decoding or the setting of the time. 
     In addition to this process, a warning step can be provided to warn by a sound or a synthesized voice, in addition to or instead of the indication, when the non-setting of time is judged. 
     According to the above first structure or first method of the present invention, if the time has not been set when the G-code is inputted, the G-code is neither decoded nor indicated or the non-setting of the time is told the operator by electronic sound or synthetic voice. 
     According to the above second structure or second method, if the time has not been set when the G-code is inputted, the fact of non-setting of time is indicated on the screen or told and the setting of the present time is demanded. 
     Thus, according to the present invention, various troubles due to the non-setting of time, such as indicating the incorrect time or missing a desired program, can be avoided. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a flow chart showing a process of G-code decoding in a television receiver having a video cartridge recorder (VCR) of a first embodiment of the present invention. 
     FIG. 2 is a flow chart showing a process of G-code decoding in a television receiver having a video cartridge recorder modified from that of the first embodiment. 
     FIG. 3 is a flow chart showing a process of G-code decoding in a television receiver having a video cartridge recorder of a second embodiment of the present invention. 
     FIG. 4 is a chart showing a time setting state in the receiver of the second embodiment. 
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
     First Embodiment 
     Referring to FIG. 1, a process of G-code decoding according to the present invention comprises a G-code input routine 11, a branch 12, a G-code decoding routine 13, and a terminating routine 14. 
     If in the input routine 11, the G-code input key is depressed, in the branch 12, reference is made to the state of time setting of the clock, and, if the time has been set in the clock, decoding of the G-code is made in a G-code decoding routine 13, and if the time is not set, that is, the default time has not been corrected, the process terminates in routine 14 without doing anything further. 
     Thus, according to the first embodiment of the invention, when the G-code key is depressed, no operation begins if the time has not been set. This prevents the output of an undesired data to start recording, when the timer is employed, at an undesired time due to the start by the default time. 
     A warning routine 15 may be added between the branch 12 and terminating routine 14 as illustrated in FIG. 2, which, when the time is not set, indicates the non-setting by an electronic sound or a synthesized voice. Each part with the same numeral in FIG. 2 as in FIG. 1 works in the same way as in FIG. 1. 
     Second Embodiment 
     Referring to FIG. 3, a process of G-code decoding in a television receiver having a video cartridge recorder attached thereto comprises a G-code input routine 21, a branch 22, a G-code decoding routine 23, a time-setting mode routine 24, and a terminating routine 25. 
     Referring to FIG. 4, a time-setting screen includes an item 31 to show the present time and date and an item 32 to show the setting state of the clock. 
     Referring to FIG. 3, when the G-code input key is depressed in the routine 21, and at the branch 22 the present state of the time setting is determined, and, if the present time has been set, the G-code decoding is made at the decoding routine 23 to show the result of the decoding at item 31 as well as other information and &#34;CLOCK ON&#34; at item 32, and to terminate through the routine 25. 
     If the time has not been set, an image is shown, as that shown in FIG. 4, to indicate &#34;CLOCK OFF&#34; by the item 32, demanding the input of the present time. If the operator inputs the present time, it is indicated in the item 31 and the process is terminated by the routine 25. 
     Thus, by being provided with a means for decoding a G-code when the time has not been set, to indicate the non-setting of the time and to enter the time-setting mode, the operator sets, in the time-setting mode screen as shown in FIG. 4, the year, month, day and time in the article 31 and changes the article 32 to &#34;CLOCK ON&#34;. 
     As described above, in a television receiver having a VCR comprising a G-code decoding means, the present embodiment has a means to demand the input of the present time and indicate that the present time has not been set. Therefore, the operator can input the present time following an instruction and continue G-code decoding. This prevents a failure in the recording of a desired program due to the non-setting of the present time. 
     Instead of, or in addition to, the indication of the non-setting of the time on the screen in the time-setting mode routine 24, an alarm using an electronic sound or a synthetic voice can be used. 
     One method of determining the clock status is as follows. When the G-code input key is depressed, a value stored in a memory (not shown) which contains the present state of the time setting is accessed. If the value is &#34;0&#34;, then it is determined that the present time has not been set, and therefore, the G-code decoding cannot occur and the time-setting screen is displayed. If the value is &#34;1&#34;, then it is determined that the present time has been set, and therefore, the G-code decoding can occur. 
     One method of changing the clock status is as follows. A cursor is moved to select &#34;CLOCK&#34; in a main menu (not shown). This causes the time-setting screen of FIG. 4 to be displayed. The present time is then set. The cursor is then moved to select &#34;CLOCK OFF&#34;. This causes &#34;CLOCK ON&#34; to be displayed. When &#34;CLOCK OFF&#34; changes to &#34;CLOCK ON&#34;, the value in the memory is set to &#34;1&#34;, which, as described above, corresponds to the present time being set. It should be noted that other methods of determining and changing the clock status may be used. 
     While specific embodiments of the invention have been illustrated and described herein, it is realized that modifications and changes will occur to those skilled in the art. It is therefore to be understood that the appended claims are intended to cover all modifications and changes as fall within the true spirit and scope of the invention.