Waveform measuring instrument
The waveform measuring instrument efficiently extracts bit strings at desired positions using reduced memory by employing a control unit to identify frame positions, addressing the memory requirement challenge of protocols like SAE J1939 that divide data into multiple frames.
Patent Information
- Application Number
- JP2022189469
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-08-20
- Estimated Expiration
- 2042-11-28
AI Technical Summary
Conventional waveform measuring instruments require large memory capacity to obtain bit strings at desired positions when protocols like SAE J1939 divide data into multiple frames.
The waveform measuring instrument employs a control unit to identify frame positions using first and second identification information, allowing it to read bit strings from first and second memories based on this information, reducing the required memory capacity by storing only one frame's worth of information.
Enables accurate extraction of bit strings at desired positions using a smaller memory capacity, even when data is transferred in multiple frames, thus reducing costs and optimizing memory usage.
Smart Images

Figure 0007726863000001 
Figure 0007726863000002 
Figure 0007726863000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a waveform measuring instrument. [Background technology]
[0002] A waveform measuring instrument is a device that measures a signal under test and analyzes and displays the waveform. For example, a digital oscilloscope is an example of such a waveform measuring instrument. Some waveform measuring instruments are known that measure serial data flowing on a serial bus, analyze the measured serial data based on a communication protocol, and decode the serial data into bits or bit strings (for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2009-128080 Summary of the Invention [Problem to be solved by the invention]
[0004] However, when a protocol that divides data and transfers it in multiple frames, such as SAE (Society of Automotive Engineers) J1939, is used, conventional waveform measuring instruments require a large amount of memory to obtain the bit string at the desired position from the transferred data.
[0005] The present disclosure aims to provide a waveform measuring instrument that can obtain a bit string at a desired position from transferred data using a memory with a smaller capacity, even when a protocol is used in which data is divided and transferred in multiple frames. [Means for solving the problem]
[0006] The waveform measurement device according to some embodiments includes: (1) A waveform measuring device capable of receiving a frame, a communication unit that receives a plurality of frames for transferring target data consisting of a plurality of bits; a first memory that stores a first frame included in the plurality of frames; a second memory for storing a second frame that is the next frame of the first frame; A control unit; Equipped with The control unit acquire first identification information that identifies the position of the bit string to be extracted in the target data; obtaining second identification information that identifies a position of the bit string in the plurality of frames based on the first identification information; reading the bit strings from the first memory and the second memory based on the second identification information; The read bit string is stored in a third memory.
[0007] In this way, the waveform measuring instrument is configured to obtain the second specifying information based on the first specifying information, and to read bit strings from the first memory and the second memory based on the second specifying information, so that each of the first memory and the second memory only needs to hold one frame's worth of information. Therefore, even if a protocol is used in which data is divided and transferred in multiple frames, it is possible to obtain bit strings at desired positions from transferred data using a memory with a smaller capacity.
[0008] (2) In the waveform measuring instrument of (1), the control unit determining that data transfer according to a transport protocol has started when a value of a predetermined bit position in the frame received by the communication unit matches a first value; When it is determined that data transfer according to the transport protocol has started, a status value indicating that the data transfer is according to the transport protocol is held in a register.
[0009] In this way, the waveform measuring instrument determines that data transfer based on the transport protocol has started and stores in a register a status value indicating that the data transfer is based on the transport protocol. Therefore, when the waveform measuring instrument receives another frame, it can easily determine whether the frame was transferred based on the transport protocol by referring to the status value.
[0010] (3) In the waveform measuring instrument of (2), when the communication unit receives the frame, if the status value stored in the register indicates that the data is being transferred using the transport protocol, the control unit obtains the second identification information based on the first identification information and reads out the bit string from the first memory and the second memory based on the second identification information.
[0011] In this way, when data is transferred using a transport protocol, the waveform measuring instrument reads bit strings from the first memory and the second memory based on the second identification information obtained based on the first identification information, and can therefore accurately obtain bit strings according to the data format of the transport protocol.
[0012] (4) In the waveform measuring instrument of (2) or (3), when the communication unit receives the frame, if the status value held in the register does not indicate that the data is being transferred using the transport protocol, the control unit reads the bit string from the second memory based on the first identification information.
[0013] In this way, when data transfer is not by a transport protocol, the waveform measuring instrument reads out a bit string from the second memory based on the first identification information, and can therefore accurately obtain a bit string according to the data format of a protocol that is not a transport protocol.
[0014] (5) In the waveform measuring instrument according to any one of (2) to (4), the control unit determining that data transfer according to a transport protocol has ended when a value at a predetermined bit position in the frame received by the communication unit matches a second value; When it is determined that the data transfer according to the transport protocol has ended, a status value indicating that the data transfer is not according to the transport protocol is held in a register.
[0015] In this way, when the waveform measuring instrument determines that the data transfer based on the transport protocol has ended, it stores in a register a status value indicating that the data transfer was not based on the transport protocol. Therefore, when the waveform measuring instrument receives another frame, it can easily determine by referring to the status value that the frame was transferred without using the transport protocol.
[0016] (6) In any one of the waveform measuring instruments (1) to (5), the control unit acquiring, as the first identification information, an extraction start position and an extraction bit length of the bit string in the target data; As the second identification information, the sequence number of the frame and the extraction start physical position are acquired.
[0017] In this way, the waveform measuring instrument obtains the frame sequence number and the extraction start physical position based on the extraction start position and extraction bit length in the target data of the bit string, so that the desired bit string can be accurately obtained even if the target data is transferred in multiple frames.
[0018] (7) In any of the waveform measuring instruments (1) to (6), when the source address and destination address written in the frame received by the communication unit match predetermined values, the control unit acquires the second identification information based on the first identification information, and reads the bit string from the first memory and the second memory based on the second identification information.
[0019] In this way, the waveform measuring instrument reads out a bit string when the source address and destination address match, and is therefore able to analyze the bit string by focusing on frames communicated between specific nodes.
[0020] (8) In the waveform measuring instrument according to any one of (1) to (7), the control unit causes a display unit to display the waveform of the data represented by the bit string stored in the third memory.
[0021] In this way, the waveform measuring instrument displays the waveform of the data extracted from the frame, so that the user can recognize the waveform of the data of interest. [Effects of the Invention]
[0022] According to one embodiment of the present disclosure, even when a protocol is used in which data is divided and transferred in multiple frames, it is possible to obtain a bit string at a desired position from the transferred data using a memory with a smaller capacity. [Brief explanation of the drawings]
[0023] [Figure 1] FIG. 10 is a block diagram showing the configuration of a waveform measuring instrument according to a comparative example. [Figure 2] 2 is a diagram for explaining the operation of the waveform measuring instrument of FIG. 1. FIG. [Figure 3] 2 is a diagram for explaining the operation of the waveform measuring instrument of FIG. 1. FIG. [Figure 4] 2 is a diagram for explaining the operation of the waveform measuring instrument of FIG. 1. FIG. [Figure 5] 1 is a block diagram illustrating an example configuration of a waveform measurement system according to an embodiment of the present disclosure. [Figure 6] FIG. 6 is a block diagram showing an example of the configuration of the waveform measuring device of FIG. 5. [Figure 7] 7 is a diagram showing an example of setting values held by a setting value holding unit in FIG. 6. FIG. [Figure 8] 6 is a diagram for schematically explaining an example of the operation of the waveform measuring device of FIG. 5. FIG. [Figure 9] 6 is a diagram for schematically explaining an example of the operation of the waveform measuring device of FIG. 5. FIG. [Figure 10A] 6 is a diagram for schematically explaining an example of the operation of the waveform measuring device of FIG. 5. FIG. [Figure 10B] 6 is a diagram for schematically explaining an example of the operation of the waveform measuring device of FIG. 5. FIG. [Figure 10C] 6 is a diagram for schematically explaining an example of the operation of the waveform measuring device of FIG. 5. FIG. [Figure 11A] 6 is a diagram for schematically explaining an example of the operation of the waveform measuring device of FIG. 5. FIG. [Figure 11B] 6 is a diagram for schematically explaining an example of the operation of the waveform measuring device of FIG. 5. FIG. [Figure 12] 6 is a flowchart showing an example of the operation of the waveform measuring instrument of FIG. 5. [Figure 13] 13 is a flowchart showing an example of the TP command analysis process of FIG. 12. [Figure 14] 6 is a flowchart showing an example of the operation of the waveform measuring instrument of FIG. 5. DETAILED DESCRIPTION OF THE INVENTION
[0024] <Comparative Example> FIG. 1 is a block diagram showing the configuration of a waveform measuring instrument 9 according to a comparative example. The waveform measuring instrument 9 extracts (cuts out) data from a predetermined position in a data field of a predetermined PGN (Parameter Group Number) from a communication frame of SAE J1939 (see SAE J1939 standard) and records the data as a trend waveform. SAE J1939 is a transport layer communication protocol that communicates based on CAN (Controller Area Network) communication (see ISO11898 standard) in the physical layer and data link layer. As shown in FIG. 1, the waveform measuring instrument 9 according to the comparative example includes a frame analysis unit 901, an ID comparison unit 902, a data extraction unit 903, a data holding unit 904, an output controller 905, a sample timing generation unit 906, a memory controller 907, a memory 908, a readout unit 909, a waveform creation unit 910, and a display unit 911.
[0025] The frame analysis unit 901 receives a frame signal (CAN frame) of CAN communication to be analyzed. The frame analysis unit 901 analyzes the CAN frame in accordance with the CAN communication standard and performs bit stuffing processing, CRC (Cyclic Redundancy Check) error determination, etc. The frame analysis unit 901 extracts an ID (identification information) and a data field from the CAN frame.
[0026] An ID comparison unit 902 compares a preset ID (comparison ID) with the ID extracted from the CAN frame by the frame analysis unit 901. If the IDs match, a data extraction unit 903 extracts the necessary data from the data field extracted from the CAN frame and stores the extracted data in a data storage unit 904.
[0027] The sample timing generation unit 906 outputs a sampling signal at a fixed cycle for recording data to the output controller 905. Upon receiving the sampling signal from the sample timing generation unit 906, the output controller 905 reads out the data held in the data holding unit 904 and sends the read data to the memory controller 907.
[0028] The memory controller 907 stores the data sent from the output controller 905 in the memory 908. The reading unit 909 appropriately reads out the data stored in the memory 908. The waveform creating unit 910 converts the data read out by the reading unit 909 into waveform data and displays it on the display unit 911.
[0029] 2 to 4 are diagrams for schematically explaining the operation of the waveform measuring instrument 9 of FIG. 1. FIG. 2 shows the data extraction operation by the ID comparing unit 902 and the data extracting unit 903. A plurality of comparison IDs are set in advance in the ID comparing unit 902. For each of the plurality of comparison IDs, an extraction start position, which is the position at which data (bit string) is extracted from the data field of the input CAN frame, is defined in advance. The extraction start position is specified, for example, by the bit position at which the data to be extracted starts in the data field.
[0030] When a CAN frame is input to frame analysis unit 901, ID comparison unit 902 compares the ID extracted from the CAN frame by frame analysis unit 901 with each of the preset comparison IDs in turn. If the ID of the CAN frame matches any of the comparison IDs, data extraction unit 903 extracts data of a predetermined bit length from the extraction start position defined for that comparison ID in the data field of the CAN frame.
[0031] That is, when a CAN frame is input, the ID comparison unit 902 compares the ID of the CAN frame with multiple preset comparison IDs. If any of the comparison IDs match, the data extraction unit 903 extracts data from the extraction start position corresponding to that comparison ID. The data storage unit 904 stores the extracted data as channel data. The comparison ID may be different or the same for each channel (CH). Even if the comparison ID is the same, if the extraction start position or extraction bit length is different, the waveform measurement unit 9 can separately extract and record data from different bit positions in the data field.
[0032] FIG. 3 shows an example of data transfer using the transport protocol of the J1939 communication standard. In the J1939 communication standard, similar to the communication described with reference to FIG. 2, communication devices transfer data using frames containing an ID and data. The data receiver can determine and analyze the meaning of the data by recognizing the ID value. Furthermore, the J1939 communication standard allows data to be divided and transferred using multiple data fields using the transport protocol. FIG. 3 shows an example of data being divided and transferred using the transport protocol. The transport protocol allows data of up to 1,785 bytes to be divided and transferred.
[0033] When transferring data using the J1939 transport protocol, the data spans multiple data fields, so it is not possible to extract the desired bit string contained in the data simply by specifying the ID and the extraction start position, as in the data extraction in Figure 2. Also, with the transport protocol, frames for handshaking for the transport protocol and sequence numbers, etc. are included in the data field, so it is not possible to extract and record data from any position without analyzing and deleting these.
[0034] It is also possible to extract only the data from a series of transport protocol frames, rearrange and concatenate only the data, and then extract the required portion from the concatenated data string, as shown in Figure 4. Figure 4 shows an example in which four pieces of data, each 7 bytes, are concatenated, and a bit string 501 with a bit length of 16 (2 bytes) starting from start bit position 120 (= 8 bits × (16 - 1)) of DATA16 included in the third piece of data is extracted.
[0035] In this method, the waveform measuring instrument 9 requires memory to hold the concatenated data. As mentioned above, the maximum data length that can be transferred using the J1939 transport protocol is 1,785 bytes. Therefore, to rearrange the data to accommodate the maximum data length, a buffer memory equivalent to 1,785 bytes is required per transport protocol. Considering that multiple transport protocols operate simultaneously in parallel, a buffer memory capacity equal to the number of analyzable channels must be provided. Therefore, to implement this method, the waveform measuring instrument 9 must be equipped with a large-capacity buffer memory. When the waveform measuring instrument 9 is configured for embedded use or using an FPGA (Field Programmable Gate Array), the memory capacity becomes large, resulting in increased costs. Furthermore, if the target data contains multiple bit strings to be referenced, a buffer memory capable of storing the target data is required for each bit string, further increasing the required memory capacity.
[0036] In waveform measurement instruments, it is important to focus on specific data and record how that value changes over time. For example, a specific byte portion of data transferred via a transport protocol indicates a specific parameter (e.g., temperature, rotation speed, etc.) that represents the behavior of the device under test, so it is important to extract that parameter and display it as a time trend. Such parameters to be observed are generally several bytes (e.g., 4 bytes) in size. Therefore, when extracting and recording such specific parameters as trends, even if a large-capacity buffer memory is provided to rearrange all data transferred via the transport protocol, it will capture portions that are not required for observation, resulting in a wasteful configuration.
[0037] The present disclosure aims to make it possible to obtain a bit string at a desired position from transferred data using a memory with a smaller capacity, even when a protocol that divides data and transfers it in multiple frames, such as the J1939 transport protocol, is used.
[0038] <Embodiment> Hereinafter, an embodiment of the present disclosure will be described with reference to the drawings. In each drawing, parts having the same configuration or function are denoted by the same reference numerals. In the description of this embodiment, duplicated descriptions of the same parts may be omitted or simplified as appropriate.
[0039] (Waveform measurement system) 5 is a block diagram showing an example configuration of a waveform measurement system 1 according to an embodiment of the present disclosure. The waveform measurement system 1 measures the waveform of data communicated between multiple nodes including sensors and electronic control units (ECUs) provided in industrial equipment such as automobiles, agricultural machinery, or ships. Here, the sensors measure physical quantities related to the operation and environment of each device such as an engine, transmission, and brakes.
[0040] The waveform measurement system 1 includes a waveform measurement instrument 10 and multiple nodes 50 (50a, 50b, 50c). The waveform measurement instrument 10 and the multiple nodes 50 (50a, 50b, 50c) are connected to each other so that they can communicate with each other via a network 6 that includes, for example, serial communication lines. Below, an example will be described in which the multiple nodes 50 (50a, 50b, 50c) perform serial communication via the network 6 using J1939 on the CAN protocol.
[0041] Node 50a is a sensor that measures, for example, the engine temperature of an automobile as electrical signal data. Node 50b is a sensor that measures, for example, the engine speed of an automobile as electrical signal data. After measuring the data, nodes 50a and 50b generate frames according to a communication protocol and output the frames to node 50c via network 6.
[0042] The node 50c is, for example, an ECU of an automobile. The node 50c receives frames from each of the nodes 50a and 50b via the network 6. The node 50c acquires data from the acquired frames. The node 50c controls the engine of the automobile and the like based on the acquired data.
[0043] The waveform measurement device 10 monitors the communication between the nodes 50a, 50b and 50c, and displays the waveform of predetermined data. The waveform measurement device 10 is electrically connected to the network 6. Each frame flowing through the network 6 is input to the waveform measurement device 10.
[0044] Consider the case where, in the above configuration, one node (e.g., node 50a) transmits data exceeding 8 bytes (64 bits), which is the size of the data field of a CAN frame, from one node (e.g., node 50c) to another node (e.g., node 50c). For example, node 50a transmits target data exceeding 8 bytes to node 50c based on the J1939 transport protocol. In such a case, node 50a divides the target data and transfers it using multiple CAN frames. The waveform measuring instrument 10 receives multiple CAN frames for transferring such target data consisting of multiple bits. This target data includes a bit string indicating the value of a physical quantity of interest to the waveform measuring instrument 10, such as engine temperature or engine RPM. The waveform measuring instrument 10 converts the position of this bit string to be extracted within the entire target data to its position within the multiple CAN frames, and then acquires the bit string to be extracted based on the converted position. Therefore, the waveform measuring instrument 10 can acquire the desired bit string from the transferred data without having to have a memory for storing the entire target data, but only having the memory required to store the CAN frames.
[0045] (waveform measuring instrument) FIG. 6 is a block diagram showing an example of the configuration of the waveform measuring instrument 10 shown in FIG. 5. The waveform measuring instrument 10 extracts (extracts) a bit string from a predetermined position in a data field of a predetermined PGN from an SAE J1939 communication frame and records it as a trend waveform. The waveform measuring instrument 10 includes a communication unit 100, a control unit 200, a storage unit 300, and a display control unit 400. The communication unit 100 includes a frame analysis unit 11. The control unit 200 includes an ID comparison unit 13, a data check unit 14, a data extraction unit 15, a set value calculation unit 20, an output controller 21, a memory controller 22, and a sample timing generation unit 27. The storage unit 300 includes a data buffer 12, a data holding unit 16, a status register 17, a data buffer 18, a set value holding unit 19, and a memory 23. The display control unit 400 includes a readout unit 24, a waveform creation unit 25, and a display unit 26.
[0046] The frame analysis unit 11 receives a frame signal (CAN frame) of a CAN signal to be analyzed. The CAN frame received by the frame analysis unit 11 includes multiple frames for transferring target data consisting of multiple bits. The frame analysis unit 11 analyzes the CAN frame in accordance with the CAN communication standard and performs bit stuffing processing, CRC error detection, and the like. The frame analysis unit 11 extracts a CAN ID and a data field from the CAN frame. As shown in FIGS. 3 and 9, in the J1939 communication protocol, one CAN frame includes a 29-bit extended ID and a data field of up to 8 bytes. The data buffer 12 (second memory) stores the CAN ID and data field extracted from the CAN frame by the frame analysis unit 11. When extracting data from the J1939 communication protocol, the size of the data buffer 12 is 29 bits + 64 bits (8 bytes) = 93 bits.
[0047] The set value calculation unit 20 includes information specifying the CAN ID and PGN related to the frame, and the position of the bit string to be extracted in the target data (data extraction position, for example, extraction start position and extraction bit length), etc. Details of the values held in the set value holding unit 19 will be described later with reference to FIG.
[0048] The ID comparison unit 13 compares the CAN ID of the CAN frame held in the data buffer 12 with the CAN ID previously set in the set value holding unit 19. The data check unit 14 compares the data field of the CAN frame held in the data buffer 12 with the value previously set in the set value holding unit 19. The details of the comparison will be described later.
[0049] The status register 17 acquires the comparison results from the ID comparison unit 13 and the data check unit 14. The status register 17 holds a status value indicating whether the CAN frame being processed is a frame based on the transport protocol of J1939 communication. The status register 17 manipulates the status value based on the results from the ID comparison unit 13 and the data check unit 14. For example, if the status register 17 determines from the results from the ID comparison unit 13 and the data check unit 14 that the transport protocol communication to be analyzed has started for the J1939 communication (hereinafter, this may be referred to as a link being established), the status register 17 sets the status value to "1." If the status register 17 determines that the transport protocol communication has ended, the status register 17 sets the status value to "0." The status register 17 may have "0" as an initial value for the status value.
[0050] Data buffer 18 (first memory) references the data field of the CAN frame held in data buffer 12 and holds the last four bytes of data in the CAN frame based on the status value set in status register 17. When the status value of status register 17 is "1," i.e., when data transfer is being performed using the transport protocol, data buffer 18 holds the last four-byte bit string of the data field of the previous CAN frame. In this case, the size of data buffer 18 is 32 bits (4 bytes).
[0051] If the status value set in the status register 17 is "1," that is, if the input CAN frame is a data transfer according to the transport protocol, the set value calculation unit 20 determines whether or not the input CAN frame is a data transfer according to the transport protocol. In the case of the transport protocol, the set value calculation unit 20 converts the data extraction position set in the set value holding unit 19 into information on the position in multiple frames (extraction position information) by calculation. In other words, in the case of the transport protocol, the set value calculation unit 20 acquires the extraction position information based on information specifying the position of the bit string to be extracted in the target data. The set value calculation unit 20 outputs the information specifying the position of the bit string in multiple frames to the data extraction unit 15.
[0052] The data extraction unit 15 extracts bit strings from the data held in the data buffer 12 and the data held in the data buffer 18 based on the extraction position information input from the set value calculation unit 20, and holds the bit strings in the data holding unit 16 (third memory).
[0053] The sample timing generating unit 27 outputs a sampling signal at a fixed periodic timing for recording data to the output controller 21. Upon receiving the sampling signal from the sample timing generating unit 27, the output controller 21 reads out the data held in the data holding unit 16 and sends the read data to the memory controller 22.
[0054] The memory controller 22 stores the data sent from the output controller 21 in the memory 23. The reading unit 24 appropriately reads out the data stored in the memory 23. The waveform creating unit 25 converts the data read out by the reading unit 24 into waveform data and displays it on the display unit 26.
[0055] Each component of waveform measuring instrument 10 illustrated in Fig. 6 may be realized by separate hardware, or multiple components may be realized by the same hardware. For example, control unit 200 may be realized by one or multiple general-purpose or dedicated processors. Also, for example, communication unit 100 (frame analysis unit 11) and some components of control unit 200 may be realized by the same hardware. At least some components of waveform measuring instrument 10 may be realized by a processor executing a program.
[0056] (Bit string extraction process) Next, the details of the operation of waveform measuring instrument 10 to extract a desired bit string from a CAN frame and store it in data holding unit 16 will be described below. To simplify the explanation, an example in which one bit string is extracted will be described below. That is, one setting value pattern is set in setting value holding unit 19, and an example in which one bit string that matches the setting value is extracted from the CAN frame will be described. In other words, an example in which only one channel is recorded will be described.
[0057] Fig. 7 is a diagram showing an example of the setting values stored in the setting value storage unit 19 of Fig. 6. In the setting value storage unit 19, as shown in Fig. 7, the following series of data are set in advance. ID value: CAN ID (29 bits). The waveform measuring instrument 10 extracts bit strings from frames that do not conform to the transport protocol and whose CAN ID value matches this value. SA (Source Address) value: Address (source address, 8 bits) of the sending node (e.g., node 50a). The waveform measuring instrument 10 uses this to identify the originator of a CAN frame transferred by the transport protocol. As shown in Figures 3 and 9, the SA value is included in the CAN ID. DA (Destination Address) value: Address (destination address, 8 bits) of the destination node (e.g., node 50c). The waveform measuring instrument 10 uses this to identify the responder of the CAN frame transferred by the transport protocol. As shown in Figures 3 and 9, the DA value is included in the CAN ID. PGN value: A value (18 bits) that identifies a parameter group used in SAE J1939. The waveform measuring instrument 10 uses this to identify the PGN of a CAN frame transferred by the transport protocol. As shown in Figures 3 and 9, in the TP.CM_RTS and TP.CM_CTS of J1939, the PGN value is written in the sixth to eighth bytes of the data field of the CAN frame. For example, a different PGN value may be set for each component (e.g., engine, steering wheel, speedometer, etc.) whose physical quantity is to be measured. Extraction start position: The bit position (14 bits) where the bit string to be extracted starts in the target data. For example, in Figure 4, bit position 511 corresponds to the extraction start position. The target data is transferred by the data field of the CAN frame. Extraction bit length: The bit length of the bit string to be extracted. For example, in FIG. 4, a bit length of 16 bits (2 bytes) corresponds to the extraction bit length. Below, we will explain an example where the extraction bit length is a value of 32 bits (4 bytes) or less.
[0058] The ID value in the set value storage unit 19 is used to analyze CAN frames transferred by protocols other than the transport protocol. The SA value, DA value, and PGN value are used to analyze CAN frames transferred by the transport protocol. The extraction start position and extraction bit length are used regardless of the type of communication protocol. As shown in Figures 3 and 9, in the J1939 transport protocol, the values of bits 23-16 of the CAN ID of frames used by the transport protocol are set to 236d or 235d. The values of bits 23-16 of the CAN ID of TP.CM_RTS, TP.CM_CTS, and TP.CM_EndOfMsgACK, which are CAN frames transmitted and received when starting or ending communication using the transport protocol, are 236d. The value of bits 23-16 of the CAN ID of TP.DT, which is a CAN frame used to transmit and receive data using the transport protocol, is 235d. Therefore, the ID comparator 13 analyzes the values of bits 23-16 to determine whether a frame is a transport protocol frame. Note that the d in 236d, 235d, etc. indicates a decimal number.
[0059] As will be described later, the first byte of the TP.CM_RTS data field is 16d. The first byte of the TP.CM_CTS data field is 17d. Therefore, the setting value holding unit 19 may hold these values as setting values.
[0060] 8 and 9 are diagrams for schematically explaining an example of the operation of the waveform measuring instrument 10 of Fig. 5. Fig. 8 shows the operation when the input CAN frame is not a transport protocol. When the input CAN frame is not a transport protocol, the value of bits 23-16 of the CAN ID is a value specific to the transport protocol, i.e., a value other than 236d or 235d.
[0061] The waveform measuring instrument 10 compares the ID value stored in the set value storage unit 19 with the CAN ID value of the CAN frame using the ID comparison unit 13. If they match, the waveform measuring instrument 10 determines that the frame is to be analyzed. If the value of bits 23-16 of the CAN ID is 236d or 235d, the waveform measuring instrument 10 treats the input CAN frame as a frame transferred using a transport protocol. If the transport protocol is not used, the status value set in the status register 17 remains "0." Therefore, the set value calculation unit 20 outputs the extraction start position and extraction bit length stored in the set value storage unit 19 to the data extraction unit 15 as is. If the CAN ID of the input CAN frame matches the ID value stored in the set value storage unit 19, the data extraction unit 15 extracts a bit string from the data field of the CAN frame based on the extraction start position and extraction bit length output by the set value calculation unit 20. Figure 8 shows an example in which the extraction start position is 16d and the extraction bit length is 16 bits. In such a case, the data extraction unit 15 extracts the bit strings (d3, d4) of the third and fourth bytes and causes the data storage unit 16 to store them.
[0062] Figure 9 shows the operation when extracting the necessary bit string from a CAN frame transferred using the transport protocol. Figure 9 shows an example of transferring 28 bytes of data (a1, b1, , g1, a2, b2, , g2, , a4, b4, , g4) using the transport protocol.
[0063] In the transport protocol, at the beginning of communication using the transport protocol, the originator, which is the sender, issues TP.CM_RTS (521). Upon receiving TP.CM_RTS, the responder, which is the receiver, returns TP.CM_CTS (522). In the CAN ID of TP.CM_CTS (522), bits 23-16 are 236d. Bits 15-8 are DA2, which indicates the unique address of the originator. Bits 7-0 are SA2, which indicates the unique address of the responder. In the following, for example, the originator's unique address is assumed to be 1, and the responder's unique address is assumed to be 2.
[0064] When the frame analysis unit 11 receives the TP.CM_CTS (522) CAN frame, the ID comparison unit 13 determines whether bits 23-16 of the CAN ID are 236d. If bits 23-16 of the CAN ID are 236d, the data check unit 14 determines whether the first byte of the data field is 17d. Here, the first byte of the TP.CM_RTS data field is 16d. The first byte of the TP.CM_CTS data field is 17d. Therefore, if the first byte of the data field is 17d, the waveform measurement instrument 10 determines that the input CAN frame is a TP.CM_CTS CAN frame. Furthermore, the ID comparison unit 13 determines whether DA2 and SA2 (e.g., 1, 2) in the CAN ID portion of the TP.CM_CTS CAN frame are identical to SA1 and DA1 (e.g., 1, 2, the SA and DA values of the set value storage unit 19) previously set in the set value storage unit 19. If it is determined that DA2 and SA2 in the CAN ID section are the same, the data check section 14 determines whether the sixth to eighth bytes of the input CAN frame are the same as PGN1 (the PGN value of the set value storage section 19) previously set in the set value storage section 19. If it is determined that the values of the CAN ID and PGN in the CAN frame of TP.CM_CTS are the same as the values previously set in the set value storage section 19, the status register 17 determines that a link for the transport protocol to be analyzed has been established, and sets the status value to "1."
[0065] In the communication of TP.CM_RTS (521), the first byte of the data field is 16d. Therefore, even if the ID comparison unit 13 determines that bits 23-16 of the CAN ID are 236d, the data check unit 14 determines that the CAN frame is TP.CM_RTS and does not perform any processing.
[0066] Next, when communication of TP.DT (523) is received, the ID comparison unit 13 determines that bits 23-16 of the CAN ID are 235d, and if it determines that DA1 of bits 15-8 and SA1 of bits 7-0 of the CAN ID are the same as the DA1 and SA1 (cb of the setting value storage unit 19) previously set in the setting value storage unit 19, it determines that the transport protocol to be analyzed is TP.DT.
[0067] If it is determined that the transport protocol to be analyzed is TP.DT, the data extraction unit 15 extracts a bit string from the data field from the extraction position preset in the setting value storage unit 19 in accordance with the information calculated by the setting value calculation unit 20. Details of bit string extraction will be explained separately. As shown in Figures 3 and 9, the first byte of the data field of the TP.DT frame describes a sequence number (Sequence No.), which is the serial number of the TP.DT frame. The second to eighth bytes of the data field of the TP.DT frame describe target data, which is the data to be transferred.
[0068] If it is determined to be TP.DT, the waveform measurement instrument 10, in parallel with the data extraction process, stores the last four bytes (the fifth to eighth bytes) of the data field portion of the TP.DT frame in the data buffer 18. In Fig. 9, after the communication of TP.DT (523), the bit strings d1, e1, f1, and g1 are stored in the data buffer 18.
[0069] Similarly, when TP.DT (524) is received, the waveform measurement instrument 10 determines whether bits 23-16 of the CAN ID are 235d and whether DA1 and SA1 match the set values. If they match, the waveform measurement instrument 10 saves the last four bytes of the data field portion, the bit string d2, e2, f2, and g2, in the data buffer 18. Here, the data buffer 18 is overwritten with the bit string d2, e2, f2, and g2, and the previous bit string d1, e1, f1, and g1 is erased.
[0070] When a TP.CM_CTS (525) is received during data transfer using the transport protocol, the waveform measuring instrument 10 determines that the frame is a TP.CM_CTS using the ID comparison unit 13 and data check unit 14, but does not perform any particular processing.
[0071] Similarly, when TP.DT(526, 527) is received, the waveform measuring instrument 10 determines whether bits 23-16 of the CAN ID are 235d and whether DA1 and SA1 match the set values. If these match the set values, the waveform measuring instrument 10 stores the last 4 bytes of the data field in the data buffer 18.
[0072] When TP.CM_EndOfMsgACK (528) is received, the waveform measuring instrument 10 confirms in the ID comparator 13 that bits 23-16 of the CAN ID are 236d and that DA2 and SA2 are the same as SA1 and DA1 previously set in the set value holder 19. Furthermore, the waveform measuring instrument 10 confirms in the data checker 14 that the first byte of the data section is 19d. TP.CM_EndOfMsgACK is a command indicating that data transfer according to the transport protocol to be analyzed has ended. Upon receiving TP.CM_EndOfMsgACK, the waveform measuring instrument 10 clears the status value of the status register 17 to "0".
[0073] 10A to 10C, 11A, and 11B are diagrams illustrating an example of the operation of waveform measuring instrument 10 of Fig. 5. Figs. 10A to 10C show the operation of data extracting section 15 and the detailed operation of set value calculating section 20.
[0074] 10A shows a case where the extraction start position preset in the setting value holding unit 19 is 16d, and a 16-bit (2-byte) long bit string is extracted. Since the first byte of the TP.DT data field indicates the TP.DT sequence number, bit position 16d corresponds to the third byte excluding the first byte data indicating the sequence number, i.e., physical position 24d. Therefore, the data extraction unit 15 sets physical position 24d as the extraction start position and extracts a 2-byte bit string with an extraction bit length of M 16 bits (the shaded portion in FIG. 10A).
[0075] 10B shows a case where the extraction start position is 72d and a 32-bit (4-byte) bit string is extracted. When the extraction start position is 72d, data extraction unit 15 extracts a 4-byte bit string from the third byte of the data field whose sequence number is 2, that is, from physical position 24d (the shaded portion in FIG. 10B).
[0076] In this way, in data communication using the transport protocol, due to the division of the target data and the insertion of sequence numbers, the physical position at which data extraction actually begins from the data field of the CAN frame shifts from the extraction start position previously set in the setting value holding unit 19. Therefore, the waveform measuring instrument 10 corrects the extraction start position stored in the set value storage unit 19 to the sequence number of the first byte of the TP.DT data field and the extraction start position in the data field of the CAN frame. The set value calculation unit 20 performs this correction of the extraction start position.
[0077] In data transfer using the J1939 transport protocol, the bit string to be extracted may span two frames. FIG. 10C shows an example in which the bit string to be extracted spans two frames. Specifically, FIG. 10C shows an example in which the extraction start position preset in the set value holding unit 19 is 40d and the extraction bit length is 32 bits. When the bit string to be extracted spans two frames, the data extraction unit 15 reads the bit string from the data buffer 18, which holds the latter 4 bytes of the previous transfer data, and combines it with the current data to extract the data (the shaded area in FIG. 10C). In this case, the set value calculation unit 20 also calculates the physical position from which extraction starts. The data extraction unit 15 extracts data from the physical position acquired by the set value calculation unit 20.
[0078] Next, we will explain the process in which the set value calculation unit 20 acquires the sequence number S of the CAN frame and the extraction start physical position P in the frame based on the extraction start position N and extraction bit length M stored in the set value storage unit 19. Below, we will explain an example in which the sequence numbers written in the first byte of the data field of the TP.DT frame are assigned as 1, 2, 3, ...
[0079] First, the set value calculation unit 20 obtains R and K using the following equations (1) and (2). R=(extraction start position N%(7×8))...(1) K = R + extraction bit length M (2) Here, % is an operator that calculates the remainder (remainder of division).
[0080] Next, the set value calculation unit 20 acquires the sequence number S and the extraction start physical position P based on the value of K, dividing the cases as follows: A. When the value of K is 56 or less The sequence number S of the TP.DT frame that extracts the bit string from the data field is S = integer part of (extraction start position N / (7 × 8)) + 1 (3) The extraction start physical position P in the data field of the TP.DP frame is P=R+8 (4) This becomes: a. When the value of K is greater than 56 The sequence number S of the TP.DT frame that extracts the bit string from the data field is S = integer part of (extraction start position N / (7 × 8)) + 2 (5) The extraction start physical position P in the data field of the TP.DP frame is P=R-56 (6) However, if P calculated by (6) is negative, the data extraction unit 15 reads the bit string from the data buffer 18.
[0081] In this way, when the value of K is greater than 56, the waveform measuring instrument 10 increments the sequence number S of the TP.DT at which to start extracting the bit string by 1 compared to when the value of K is 56 or less, and obtains the bit string contained in the transfer data of the previous TP.DT from the data buffer 18. Furthermore, when using the data from the data buffer 18, the extraction start physical position P is expressed as a negative value.
[0082] For example, when the sequence number S and the extraction start physical position P are calculated in the example of FIGS. 10A to 10C, they are as follows. (1) Figure 10A (N=16, M=16) R=16%56=16 K=16+16=32 Since the value of K is equal to or less than 56, the case is A. Therefore, the sequence number S and the extraction start physical position P are calculated as follows: S=(16 / 56)+1=1 P=16+8=24 (2) Figure 10B (N = 72, M = 32) R=72%56=16 K=16+32=48 Since the value of K is equal to or less than 56, the case is A. Therefore, the sequence number S and the extraction start physical position P are calculated as follows: S=(72 / 56)+1=2 P=16+8=24 (3) Figure 10C (N=40, M=32) R=40%56=40 K=40+32=72 Since the value of K is greater than 56, the answer is yes. Therefore, the sequence number S and the extraction start physical position P are calculated as follows: S=(40 / 56)+2=2 P=40-56=-16
[0083] In the case of data communication using the J1939 transport protocol, the status value of the status register 17 is "1." Therefore, the set value calculation unit 20 performs the above calculation when the status value of the status register 17 is "1." If the status value is "0," data communication is not using the transport protocol, so the set value calculation unit 20 outputs the value held in the set value holding unit 19 to the data extraction unit 15 as is.
[0084] If the status value of the status register 17 is "1", the data extraction unit 15 determines that the data communication is according to the transport protocol and references the first byte of the transfer data of TP.DT as the sequence number. If the sequence number S output from the setting value calculation unit 20 matches the first byte of the transfer data of TP.DT, the data extraction unit 15 extracts data.
[0085] As described above, the waveform measuring instrument 10 determines whether a received CAN frame is a TP.CM_CTS frame based on the CAN frame's CAN ID, the first bit of the data field, the PGN, and other information. If the CAN frame is determined to be a TP.CM_CTS frame, the waveform measuring instrument 10 sets the status value of the status register 17 to "1." When extracting a bit string from the data field of a CAN frame, the waveform measuring instrument 10 automatically determines whether the data transfer is based on the J1939 transport protocol by referring to the status value of the status register 17. If the data transfer is based on the transport protocol, the waveform measuring instrument 10 obtains the sequence number S and the extraction start physical position P based on the extraction start position N and extraction bit length M stored in the setting value storage unit 19, and extracts the bit string. If the data transfer is not based on the transport protocol, the waveform measuring instrument 10 directly uses the extraction start position N and extraction bit length M stored in the setting value storage unit 19 to extract the bit string. Therefore, the waveform measuring instrument 10 can automatically determine the extraction start position without having to previously specify whether the data transfer is based on the transport protocol.
[0086] An example of automatic determination will be described with reference to Figures 11A and 11B. Both Figures 11A and 11B show an example where the extraction start position N is 48d and the extraction bit length M is 16 bits. Figure 11A shows an example where data transfer is performed using the transport protocol. Since it is the transport protocol, the status value of the status register 17 is "1". In this case, the set value calculation unit 20 calculates the actual extraction start position using the above-mentioned calculation formula. That is, since N = 48 and M = 16, R and K are calculated as follows: R=48%56=48 K=48+16=64 Since the value of K is greater than 56, the answer is yes. Therefore, the sequence number S and the extraction start physical position P are calculated as follows: S=(48 / 56)+2=2 P=48-56=-16 Therefore, data extraction unit 15 connects one byte of data buffer 18 with the bit string of the first byte of the data with sequence number 2 held in data buffer 12 and extracts it.
[0087] 11B, the value of the status register 17 is “0.” Therefore, the set values (extraction start position N48d, extraction bit length M16 bits) are passed as is to the data extraction unit 15, and the data extraction unit 15 extracts a bit string from the data buffer 12.
[0088] The size of the data buffer 18 needs to be equal to the maximum bit length of the data to be extracted. In the example of Figures 10A to 11B, the maximum bit length to be extracted is 4 bytes (32 bits). Therefore, the size of the data buffer 18 is 4 bytes.
[0089] (Example of operation) Fig. 12 is a flowchart showing an example of the operation of the waveform measuring instrument 10 of Fig. 5. Fig. 13 is a flowchart showing an example of the TP command analysis process of Fig. 12. The operation of the waveform measuring instrument 10 described with reference to Figs. 12 and 13 may correspond to one of the waveform measurement methods of the waveform measuring instrument 10. The operation of each step of Figs. 12 and 13 may be executed under the control of the control unit 200 of the waveform measuring instrument 10. The process of Fig. 12 is executed every time the waveform measuring instrument 10 receives a packet of a CAN frame.
[0090] In step S1, the control unit 200 receives a CAN frame from the communication unit 100.
[0091] In step S2, the control unit 200 analyzes the CAN frame input in step S1 and extracts the CAN ID and data field.
[0092] In step S3, the control unit 200 determines whether the CAN frame received in step S1 corresponds to a command of the J1939 transport protocol (TP) based on the CAN ID and data field extracted in step S2. Specifically, the control unit 200 may determine that the CAN frame corresponds to a command of the transport protocol if the value of bits 23-16 of the CAN ID is 236d or 235d. If the CAN frame corresponds to a command of the transport protocol (YES in step S3), the control unit 200 proceeds to step S6, and if not (NO in step S3), the control unit 200 proceeds to step S4. From step S4 onwards, the control unit 200 performs processing on normal CAN frames that do not correspond to the transport protocol.
[0093] In step S4, the control unit 200 determines whether the CAN ID extracted in step S2 matches the CAN ID of the setting value stored in the setting value storage unit 19. If they match (YES in step S4), the control unit 200 proceeds to step S5, and if they do not match (NO in step S4), the control unit 200 ends the processing of the flowchart.
[0094] In step S5, the control unit 200 extracts a bit string from the data field extracted in step S2 in accordance with the set value stored in the set value storage unit 19. Specifically, the control unit 200 extracts a bit string with an extraction start position N and an extraction bit length M from the data field stored in the data buffer 12. Upon completing the processing of step S5, the control unit 200 ends the processing of the flowchart.
[0095] In step S6, the control unit 200 executes a TP command analysis process to analyze the transport protocol command. Details of the TP command analysis process will be described later with reference to Fig. 13. When the TP command analysis process is completed, the control unit 200 ends the processing of the flowchart.
[0096] 13, the control unit 200 determines whether the input CAN frame is a TP.CM_CTS. Specifically, the control unit 200 determines that the input CAN frame is a TP.CM_CTS if the value of bits 23-16 of the CAN ID is 236d and the value of the first byte of the data field is 17d. If the frame is a TP.CM_CTS (YES in step S11), the control unit 200 proceeds to step S12, and if not (NO in step S11), the control unit 200 proceeds to step S14.
[0097] In step S12, the control unit 200 determines whether the SA, DA, and PGN of the CAN frame match the SA, DA, and PGN of the setting value holding unit 19. If they match (YES in step S12), the control unit 200 proceeds to step S13, and if they do not match (NO in step S12), the control unit 200 ends the TP command analysis process.
[0098] In step S13, the control unit 200 sets the status value of the status register 17 to "1." Then, the control unit 200 ends the TP command analysis process.
[0099] In step S14, the control unit 200 determines whether the input CAN frame is TP.DT. Specifically, the control unit 200 determines that the input CAN frame is TP.DT when the value of bits 23-16 of the CAN ID is 235d. If the input CAN frame is TP.DT (YES in step S14), the control unit 200 proceeds to step S15, and if not (NO in step S14), the control unit 200 proceeds to step S21.
[0100] In step S15, the control unit 200 determines whether the SA and DA of the CAN frame match the SA and DA of the setting value holding unit 19. If they match (YES in step S15), the control unit 200 proceeds to step S16, and if they do not match (NO in step S16), the control unit 200 ends the TP command analysis process.
[0101] In step S16, the control unit 200 determines whether the status value of the status register 17 is "1." If the status value is "1" (YES in step S16), the control unit 200 proceeds to step S17; if not (NO in step S16), the control unit 200 ends the TP command analysis process.
[0102] In step S17, the control unit 200 determines the sequence number S and extraction start physical position P of the CAN frame based on the extraction start position N and extraction bit length M stored in the setting value storage unit 19. The details of the procedure for determining the sequence number S and extraction start physical position P are as described above.
[0103] In step S18, the control unit 200 determines whether the sequence number of the CAN frame matches the sequence number S determined in step S17. If they match (YES in step S18), the control unit 200 proceeds to step S19, and if they do not match (NO in step S18), the control unit 200 ends the TP command analysis process.
[0104] In step S19 , the control unit 200 reads out a bit string of extraction bit length M from the extraction start physical position P in the data buffers 12 and 18 , and stores it in the data storage unit 16 .
[0105] In step S20, the control unit 200 overwrites the bit string in the data buffer 18 with the bit string of the latter 4 bytes (32 bits) of the data buffer 12. Then, the control unit 200 ends the TP command analysis process.
[0106] In step S21, the control unit 200 determines whether the input CAN frame is TP.CM_EndOfMsgACK. Specifically, the control unit 200 determines that the input CAN frame is TP.CM_EndOfMsgACK if the value of bits 23-16 of the CAN ID is 236d and the first byte of the data field is 19d. If the frame is TP.CM_EndOfMsgACK (YES in step S21), the control unit 200 proceeds to step S22; if not (NO in step S21), the control unit 200 ends the TP command analysis process.
[0107] In step S22, the control unit 200 determines whether the SA, DA, and PGN of the CAN frame match the SA, DA, and PGN of the setting value holding unit 19. If they match (YES in step S22), the control unit 200 proceeds to step S23, and if they do not match (NO in step S22), the control unit 200 ends the TP command analysis process.
[0108] In step S23, the control unit 200 sets the status value of the status register 17 to "0." Then, the control unit 200 ends the TP command analysis process.
[0109] As described above, waveform measurement instrument 10 capable of receiving frames comprises communication unit 100, data buffer 18, data buffer 12, and control unit 200. Communication unit 100 receives multiple frames for transferring target data consisting of multiple bits. Data buffer 18 holds a first frame included in the multiple frames. Data buffer 12 holds a second frame, which is the frame following the first frame. Control unit 200 acquires first identification information (e.g., extraction start position N and extraction bit length M) that identifies the position of the bit string to be extracted in the target data. Based on the first identification information, control unit 200 acquires second identification information (e.g., sequence number S and extraction start physical position P) that identifies the position of the bit string in the multiple frames. Based on the second identification information, control unit 200 reads the bit string from data buffers 12 and 18 and stores the read bit string in data storage unit 16.
[0110] In this way, waveform measuring instrument 10 obtains second specifying information based on the first specifying information, and reads bit strings from data buffers 12, 18 based on the second specifying information, so each of data buffers 12, 18 only needs to hold information for one frame at most. Therefore, waveform measuring instrument 10 can obtain bit strings at desired positions from transferred data using a memory with a smaller capacity, even when a protocol is used in which data is divided and transferred in multiple frames.
[0111] Although the present embodiment describes an example in which the J1939 transport protocol using CAN frames is used, the waveform measuring instrument 10 can be applied to any protocol that divides large data into multiple frames and transfers them. Furthermore, although the present embodiment describes an example in which a single setting value is stored in the setting value storage unit 19, the setting value storage unit 19 may store multiple setting values. In this case, the waveform measuring instrument 10 may compare each input frame with each setting value stored in the setting value storage unit 19, analyze frames that match the setting values, and extract multiple data that match the setting values from one frame. In this case, the waveform measuring instrument 10 needs to have a data buffer 18 for each setting value. Furthermore, the present embodiment describes an example in which the first identification information is an extraction start position N and an extraction bit length M, but the format of the first identification information is not limited to this. For example, the first identification information may be an extraction start position and an extraction end position. Furthermore, the present embodiment describes an example in which the second identification information is a sequence number S and an extraction start physical position P, but the format of the second identification information is not limited to this. For example, the second identification information may be a sequence number and an extraction end physical position.
[0112] Furthermore, the control unit 200 may determine that data transfer using the transport protocol has started when the value of a predetermined bit position in a frame received by the communication unit 100 matches a first value (e.g., 23-16 of the CAN ID is 236d, and the first byte of the data field is 17d). When the control unit 200 determines that data transfer using the transport protocol has started, the control unit 200 may store in the status register 17 a status value (e.g., "1") indicating that the data transfer is using the transport protocol. In this way, the waveform measuring instrument 10 determines that data transfer using the transport protocol has started, and stores in the status register 17 a status value indicating that the data transfer is using the transport protocol. Therefore, when the waveform measuring instrument 10 receives another frame, it can easily determine whether the frame has been transferred based on the transport protocol by referring to the status value.
[0113] Furthermore, when communication unit 100 receives a frame and the status value held in status register 17 indicates that the data transfer is based on a transport protocol, control unit 200 may acquire second identification information based on the first identification information and read a bit string from data buffers 12, 18 based on the second identification information. In this way, when data transfer is based on a transport protocol, waveform measuring instrument 10 reads a bit string from data buffers 12, 18 based on the second identification information acquired based on the first identification information, and therefore can accurately acquire a bit string in accordance with the data format of the transport protocol.
[0114] Furthermore, when communication unit 100 receives a frame and the status value held in status register 17 does not indicate that the data transfer is based on a transport protocol (for example, the status value is "0"), control unit 200 may read a bit string from data buffer 12 based on the first identification information. In this way, waveform measuring instrument 10 reads a bit string from data buffer 12 based on the first identification information when the data transfer is not based on a transport protocol, and therefore can accurately obtain a bit string according to the data format of a protocol that does not fall under the transport protocol.
[0115] Furthermore, the control unit 200 may determine that data transfer using the transport protocol has ended when the value of a predetermined bit position in a frame received by the communication unit 100 matches a second value (e.g., 23-16 of the CAN ID is 236d, and the first byte of the data field is 19d). When the control unit 200 determines that data transfer using the transport protocol has ended, the control unit 200 may store in a register a status value (e.g., "0") indicating that the data transfer was not using the transport protocol. In this way, when the waveform measuring instrument 10 determines that data transfer using the transport protocol has ended, the waveform measuring instrument 10 stores in the status register 17 a status value indicating that the data transfer was not using the transport protocol. Therefore, when the waveform measuring instrument 10 receives another frame, it can easily determine that the frame was transferred without using the transport protocol by referring to the status value.
[0116] Furthermore, the control unit 200 may acquire, as the first specification information, the extraction start position and extraction bit length in the target data of the bit string. The control unit 200 may acquire, as the second specification information, the sequence number of the frame and the extraction start physical position. In this way, the waveform measuring instrument 10 acquires the frame sequence number and the extraction start physical position based on the extraction start position and extraction bit length in the target data of the bit string, so that the desired bit string can be accurately acquired even if the target data is transferred in multiple frames.
[0117] Furthermore, when the source address and destination address written in a frame received by the communication unit 100 match predetermined values, the control unit 200 may acquire second identification information based on the first identification information and read a bit string from the data buffers 12, 18 based on the second identification information. In this way, the waveform measuring instrument 10 reads a bit string when the source address and destination address match, and therefore it is possible to analyze the bit string by focusing on frames communicated between specific nodes.
[0118] Furthermore, the control unit 200 may cause the display unit 26 to display the waveform of the data represented by the bit string stored in the data storage unit 16. In this way, the waveform measurement instrument 10 displays the waveform of the data extracted from the frame, allowing the user to recognize the waveform of the data of interest.
[0119] As described above, the waveform measuring instrument 10 according to this embodiment makes it possible to analyze data communicated using the J1939 transport protocol with a small buffer capacity. Furthermore, by providing a status register 17 that manages whether a transport protocol link has been established, the waveform measuring instrument 10 can automatically recognize data communication using the transport protocol. Furthermore, when data transfer is performed using the transport protocol, the waveform measuring instrument 10 automatically corrects the data extraction position using the set value calculation unit 20, so that the data extraction position can be set in the set value holding unit 19 without having to be particularly aware of whether the protocol is a transport protocol or not.
[0120] (Other embodiments) In the above description, a single set of setting values for data analysis is stored in the setting value storage unit 19. However, the setting value storage unit 19 may store multiple sets of PGNs to be analyzed, extraction start positions, and extraction bit lengths. The waveform measurement instrument 10 may then process the input CAN frame based on each setting value to extract data. By sequentially executing such processing, the waveform measurement instrument 10 can record multiple parameters in CAN communication in chronological order. For example, engine RPM data may be recorded in one portion of the target data, and engine temperature data may be recorded in another portion. In such a case, the waveform measurement instrument 10 can acquire the engine RPM data and temperature data, analyze them, and display the waveforms on the display unit 26.
[0121] To achieve this processing, for example, waveform measuring instrument 10 may be configured to include a set value holding unit 19, a status register 17, a data buffer 18, and a data holding unit 16, the number of which corresponds to the number of analyses to be performed. Waveform measuring instrument 10 configured in this way sequentially reads set values from set value holding unit 19 for each input CAN frame, and repeats the processing. The operation of such waveform measuring instrument 10 will be described with reference to FIG. 14.
[0122] Fig. 14 is a flowchart showing an example of the operation of waveform measuring instrument 10 of Fig. 5. The operation of waveform measuring instrument 10 described with reference to Fig. 14 may correspond to one of the waveform measurement methods of waveform measuring instrument 10. The operation of each step in Fig. 14 may be executed under the control of control unit 200 of waveform measuring instrument 10. The processing in Fig. 12 is executed every time waveform measuring instrument 10 receives a CAN frame packet.
[0123] In step S31, the control unit 200 receives a CAN frame from the communication unit 100.
[0124] In step S32, the control unit 200 reads out the setting value from the setting value holding unit 19 to be processed.
[0125] In step S33, the control unit 200 analyzes the CAN frame input in step S31 and extracts the CAN ID and data field.
[0126] In step S34, the control unit 200 determines whether the CAN frame received in step S31 corresponds to a command of the J1939 transport protocol (TP) based on the CAN ID and data field extracted in step S33. Step S34 can be executed in the same manner as step S3 in FIG. 12. If the CAN frame corresponds to a command of the transport protocol (YES in step S34), the control unit 200 proceeds to step S37, and if not (NO in step S34), the control unit 200 proceeds to step S35. From step S35 onwards, the control unit 200 performs processing on normal CAN frames that do not correspond to the transport protocol.
[0127] In step S35, the control unit 200 determines whether the CAN ID extracted in step S33 matches the CAN ID of the setting value read out in step S32. If they match (YES in step S35), the control unit 200 proceeds to step S36, and if not (NO in step S35), the control unit 200 proceeds to step S38.
[0128] In step S36, the control unit 200 extracts a bit string from the data field extracted in step S33 in accordance with the setting value read in step S32. The process of step S36 can be executed in the same manner as step S6 in Fig. 12. After completing the process of step S36, the control unit 200 proceeds to step S38.
[0129] In step S37, the control unit 200 executes a TP command analysis process to analyze the transport protocol command. Details of the TP command analysis process are as described above with reference to Figure 13. When the TP command analysis process ends, the control unit 200 proceeds to step S38.
[0130] In step S38, the control unit 200 determines whether or not the processing of steps S32 to S37 has been completed for all the setting values. If the processing of all the setting values has been completed (YES in step S38), the control unit 200 ends the processing of the flowchart. If not (NO in step S38), the control unit 200 returns to step S32 and continues the processing for the unprocessed setting values.
[0131] In this way, when multiple setting values are set, the control unit 200 performs processing such as data extraction for each input frame based on the frame. Therefore, even if the target data contains multiple bit strings of interest, the waveform measurement instrument 10 can extract each bit string and perform analysis and display.
[0132] 14 shows an example in which waveform measuring instrument 10 sequentially performs the processes of steps S32 to S37 for each set value, but this is not a limitation. For example, if waveform measuring instrument 10 includes set value holding units 19, status registers 17, data buffers 18, and data holding units 16 in the same number as the number of analyses to be performed, it may be configured to perform the processes of steps S32 to S37 in parallel for each set value. With this configuration, it is possible to perform the processes related to data extraction and analysis at high speed.
[0133] As described above, the waveform measuring instrument 10 automatically determines whether the data field length of the preset PGN to be observed is within 7 bytes or whether it is a multi-frame transfer using a transport protocol with a data field length exceeding 7 bytes. Furthermore, the waveform measuring instrument 10 can extract bit strings from preset data positions within the data field using a small-scale on-board memory.
[0134] Specifically, waveform measuring instrument 10, which can extract and record data from any position in data divided and transferred using the J1939 transport protocol, is equipped with data buffer 18 that stores the latter half of the data field previously transferred using the transport protocol, without buffering all of the data of the transport protocol. This allows waveform measuring instrument 10 to extract data from any position. Therefore, bit extraction from desired positions can be performed with a minimum memory configuration, making it possible to reduce memory costs.
[0135] Furthermore, waveform measuring instrument 10 has the function of automatically determining whether data transfer is via a transport protocol or not. This allows waveform measuring instrument 10 to extract data without having to set in advance whether the data to be analyzed will be transferred via a transport protocol. This function reduces the number of setting values to be set in setting value holding unit 19, thereby reducing the circuit size and the number of user setting items.
[0136] When extracting and recording specific data from a CAN frame in CAN communication, the waveform measuring instrument 10 has a function for analyzing commands to be analyzed and recorded using the transport protocol. The waveform measuring instrument 10 has a status register 17 that indicates whether a transport protocol link has been established. The waveform measuring instrument 10 determines whether the data to be analyzed is being transferred using the transport protocol based on the status value held in the status register 17, and if the data communication is using the transport protocol, it automatically corrects the data extraction position by calculation. The waveform measuring instrument 10 extracts data from the corrected extraction position and can record and display the data.
[0137] The present disclosure is not limited to the above-described embodiments. For example, multiple blocks shown in the block diagrams may be integrated, or one block may be divided. Multiple steps shown in the flowcharts may be executed in parallel or in a different order depending on the processing capabilities of the device executing each step, or as needed, instead of being executed in chronological order as described. Other modifications are possible without departing from the spirit of the present disclosure. [Explanation of symbols]
[0138] 1. Waveform measurement system 6 Network 10 Waveform measuring device 11 Frame Analysis Unit 12 Data Buffers 13 ID comparison section 14 Data Check Section 15 Data Extraction Section 16 Data storage unit 17 Status Register 18 Data Buffers 19 Setting value holding section 20 Setting value calculation section 21 Output Controller 22 Memory Controller 23 Memory 24 Reading section 25 Waveform creation section 26 Display section 27 Sample timing generator 50 nodes 90 Waveform measuring instrument 100 Communications Department 200 control section 300 Storage section 400 Display control unit 901 Frame Analysis Unit 902 ID comparison section 903 Data Extraction Unit 904 Data storage unit 905 Output Controller 906 Sample timing generator 907 Memory Controller 908 memory 909 Reading section 910 Waveform Creation Unit 911 Display section
Claims
1. A waveform measuring device capable of receiving a frame, a communication unit that receives a plurality of frames for transferring target data consisting of a plurality of bits; a first memory for storing a first frame included in the plurality of frames; a second memory for storing a second frame that is the next frame of the first frame; A control unit; Equipped with The control unit acquiring first identification information that identifies a position of a bit string to be extracted in the target data; obtaining second identification information that identifies a position of the bit string in the plurality of frames based on the first identification information; reading the bit string from the first memory and the second memory based on the second identification information; storing the read bit string in a third memory; Waveform measuring instrument.
2. The control unit determining that data transfer according to a transport protocol has started when a value of a predetermined bit position in the frame received by the communication unit matches a first value; when it is determined that data transfer according to the transport protocol has started, a status value indicating that the data transfer is according to the transport protocol is stored in a register; The waveform measuring instrument according to claim 1 .
3. The control unit 3. The waveform measuring instrument according to claim 2, wherein, when the communication unit receives the frame, if the status value held in the register indicates that the data transfer is according to the transport protocol, the second identification information is obtained based on the first identification information, and the bit string is read from the first memory and the second memory based on the second identification information.
4. The control unit 3. The waveform measuring instrument according to claim 2, wherein when the communication unit receives the frame, if the status value held in the register does not indicate that the data transfer is according to the transport protocol, the bit string is read from the second memory based on first specification information.
5. The control unit determining that data transfer according to a transport protocol has ended when a value of a predetermined bit position in the frame received by the communication unit matches a second value; When it is determined that the data transfer according to the transport protocol has ended, a status value indicating that the data transfer is not according to the transport protocol is stored in a register. The waveform measuring instrument according to claim 2 .
6. The control unit acquiring, as the first identification information, an extraction start position and an extraction bit length of the bit string in the target data; acquiring a frame sequence number and an extraction start physical position as the second identification information; The waveform measuring instrument according to claim 1 .
7. 2. The waveform measuring instrument according to claim 1, wherein the control unit, when a source address and a destination address written in the frame received by the communication unit match predetermined values, acquires the second identification information based on the first identification information, and reads out the bit string from the first memory and the second memory based on the second identification information.
8. 2. The waveform measuring instrument according to claim 1, wherein the control unit causes a display unit to display the waveform of the data represented by the bit string held in the third memory.
Citation Information
Patent Citations
Device for measuring waveform
JP2009085866A
Waveform measuring device
JP2009128080A