![]() Functions such as Add and Subtract will either adapt (because they are polymorphic) to a time stamp or coerce it to a DBL. Adding relative time to a time stampĪs you see in Figures 8.62 and Figure 8.63, the time stamp and numeric data types are closely related, and there are instances where you will need to convert between the two. The operation of adding relative time to a time stamp can be done with the Add function, as shown in Figure 8.63.įigure 8.63. Performance benchmarking template that calculates the time required to execute the code in the center frame of a Flat Sequence Structure This is an excellent demonstration of how you can use a Flat Sequence Structure for application timing and synchronization tasks.įigure 8.62. Simply capture time stamps in the first and last frames of a Flat Sequence Structure and subtract the end time from the start time to yield the total execution time of your code in the middle frame. Calculating relative time by subtracting time stampsįor example, you can use this technique to build a performance benchmarking template, such as the one shown in Figure 8.62. For example, the code shown in Figure 8.61 shows how to calculate the relative time between two time stamps using the Subtract function.įigure 8.61. Often you will want to perform time calculations. This is especially useful for time stamp constants and indicators, which do not have a Time/Date Browse button. You can also right-click time stamp controls, indicators, and constants and select Data Operations>Set Time and Date from the shortcut menu to display the Set Time and Date dialog box. From this dialog, you can easily edit the date and time value of the time stamp using a calendar-like interface. Click the Time/Date Browse button to display the Set Time and Date dialog box, shown in Figure 8.60. You can also pop up on the time stamp control and select Data Operations>Set Time to Now to set the time stamp value to the current date and time.īut, there is another way to edit the time stamp that is a lot more fun. Or you can use your keyboard to type a value to replace the selected value. You can edit the time stamp value by clicking on the portion of time you wish to change and then using the up arrow and down arrow keys to increment and decrement the value. The time stamp control may be found in the Modern>Numeric subpalette of the Controls palette. The time stamp is not only a highly precise way of storing absolute time information the time stamp control (shown in Figure 8.59) is very useful for viewing and editing time stamp values. The waveform data type uses a time stamp to store its t0 value. In the previous activity, we used the Get Date/Time In Seconds function to obtain a time stamp of the current time (see Figure 8.59), which was used to set the t0 (initial time) of the sine waveform. The time stamp control holds an absolute quantity. The time stamp is a data type that stores an absolute date/time value, such as the time of a data collection event, with very high precision (19 digits of precision each in both the whole second and fractions of a second).Ī numeric control can also be used to store and display time stamp values (we can change the display format to date/time), but the numeric control holds only a relative quantity. Because there is a natural dependency from time stamp to waveform to dynamic data, we will introduce these topics in this order. ![]() Time stamps are used to store the timing information in waveforms and multiple waveforms can be stored in dynamic data. These are the time stamp, waveform, and dynamic data. ![]() LabVIEW has some special data types that make it easier for the casual user to analyze and present this type of data in plots. For example, we might be interested in seeing how temperature varies over the time of day, or how vibrational waveforms look when plotted over a time axis. Often, data that you want to analyze or acquire is a function of time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |