Add milliseconds to a time channel entry

I am having a problem trying to add milliseconds to a time channel entry.   Currently I am using the DateAdd Function but it does not work. 
The millisecond range is in bold in the following text.
07/01/2008 10:05:00.0000 ' I am getting this out
07/01/2008 10:05:00.3000 ' I need this out
 The following script is an example of what I am trying to do
dim MuteStartTime
dim MuteDurTime
dim mutestoptime
MuteStartTime = Now  
MuteDurTime   = ".3"
MuteStopTime = DateAdd("s", MuteDurTime, MuteStartTime)  
msgbox "(Start " & RTT(MuteStartTime) & ") + (Duration " & MuteDurTime & " Sec) = (Stop " & RTT(MuteStopTime)&")"
BBANACKI

Hello BBANACKI!
The MS script documentation describes the second parameter as a long value and it will be converted to a long if it is not!
IMHO it is not a god idea to mixup VBS and DIAdem Date/Time functions. You can do what you want verry easy with pure DIAdem functions. The code will demonstrate this:Option Explicit
Dim MuteStartTime
Dim MuteDurTime
Dim MuteStopTime
' preset variables
MuteStartTime = CurrDateTimeReal
MuteDurTime = 0.3 '!!! no string!
' DIAdem Date/Time is a real with 1s accurancy
MuteStopTime = MuteStartTime + MuteDurTime
' show result
MsgBox "Start " & RTT(MuteStartTime) & " + (Duration " & MuteDurTime & " Sec) = (Stop " & RTT(MuteStopTime)&""
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  

Similar Messages

  • How do you add or subtract a constant from a time channel?

    I have a time channel with an offset I wish to remove. How can I do this? Using simple arithmetic means that I need to know how times and dates are stored internally, but I cannot determine this in the online help.
    e.g. Say I need to subtract 1.2 s from all the values in a time channel, in order to synchronise the data in that group with data in another group. How would I do this?
    Solved!
    Go to Solution.

    Hi PorridgeMan,
    Go to ANALYSIS->Basic Mathematics -> Offset Correction
    Greetings
    Walter

  • How to set a specific time zone for time channel in DIADEM

    Hi,
    I'd like to know how to autmatically set a specific time zone for time channels in DIADEM.
    For example, I have stored data with corresponding time channel in UTC time on a disk which was collected in another time zone. Now I want to analyze this data and I want the time channel to show the local time in the time zone where the data was collected, and not the time in the local time zone where the computer is located.
    The time channel should also take site local summer/winter time into account. Now I'm running a script that handles it for me which adds or subtract hours according to my input. The problem is that I'm handling data from several different time zones and I'm not located in any of them and when you're running a lot of data over a greater time period, it's easy to make mistakes, especially when it comes to summer/winter time. Is there a any clever solution to this already implemented in Diadem that I have not found? 

    Hi hj77,
    No, I'm sorry, DIAdem has no time zone functionality at all.  I'm afraid you have no choice in DIAdem but to keep running your scripts.  Summer and Winter time are truly tricky, because the rules for when the changes occur are different in different countries and states within countries and also can change from year to year within the SAME country (as they did in the US a few years ago).
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • TimeValue - Formating a time channel

    How do I Format a date/time chanel to have only the Time listed HH:MMS.
    Right now I have a Time Chanel of 01/19/2013  07:23:12:0000 which I believe is the default format.  I want to create a seperate channel that would only have the Time in it.  I am also trying to Seperate out the Hr, Min, Sec into individual channels as well.

    Hi Jcheese,
    The date/time channel in DIAdem is always a numeric channel which counts the seconds since the year 0. The representation of date/time values in VIEW or REPORT can be changed by setting the format like “hh:nn:ss”.
    Here are the settings for a VIEW table:
    One possible way to seperate the time information is the following script:
    Dim oTChn, oHChn, oMChn, oSChn, iLoop
    set oTChn = Data.GetChannel("MyTimeChannel")
    set oHChn = Data.Root.ActiveChannelGroup.Channels.Add("MyHourC​hannel",DataTypeChnFloat64)
    set oMChn = Data.Root.ActiveChannelGroup.Channels.Add("MyMinut​eChannel",DataTypeChnFloat64)
    set oSChn = Data.Root.ActiveChannelGroup.Channels.Add("MySecon​dChannel",DataTypeChnFloat64)
    for iLoop = 1 to oTChn.Size
    oHChn(iLoop) = Hour(oTChn(iLoop))
    oMChn(iLoop) = Minute(oTChn(iLoop))
    oSChn(iLoop) = Second(oTChn(iLoop))
    next
    Greetings
    Walter

  • Reverse Time Card entries

    Hi,
    We would like to reverse the time card entried created by our employees in the previous period. These time cards are for billable employees and they were assigned to the wrong expenditure org. We cannot ask all the employees to reverse them as they can be errors while reversing them manually. Are there any apis available to reverse the time cards ? Quick Suggestions are much appreciated.
    Siva

    Each period is closed for posting after certain date.
    In CATS profile settings, if u tick "Take account of period lock", you would not be able to chnge/add for a period which is already closed in costing.
    You can change the posting date in the transfer program RCATSTCO(transfer to controlling) manually.

  • Kvaser time history file incorrectly converting time channel

    I am using Kvaser Memorator for collecting data and when I use an older version of Kvaser Memorator Professional (2.0.6.600) to extract a .log file and then run through the CAN converter in Diadem 2011, the time channel comes in correctly.  If I use a newer version of Professional (3.02.186) to extract the same .log file and run through the CAN converter in Diadem 2011, the time channel is off by a factor of 10 (example a 30 second test now shows 3 seconds).  We have tried other permutations such as different files and even different versions of Diadem, but it still comes back to different versions of Kvaser Memorator Professional's writing of the .log file (or interpretation thereof by Diadem).  Attached is the .log file from the 3.02.186 version of Kvaser Memorator Professional.
    Any help is appreciated.
    Attachments:
    test 1 2012-07-18_21-16-38.log ‏601 KB

    Hello Rapom,
    As we assumed has Kvaser changed the file format. That was done in 2011-05-03 for version 2.9.850. Now they have a file format which is different (only the timestamp with a factor 10) to Vektor LOG files. In consequence to those facts we are going to add a new separate buslog converter for Kvaser log files for the next DIAdem version. In the meantime you need to calculate the offset correction by your own.
    Greetings
    Walter

  • All of a sudden, I can no longer add any plugins to any channel strips? And when I click on an existing plugin to edit, it disappears off the channel strip?

    I am running Logic express 9 on a 2008 Macbook, (non pro).  Anyhow, logic has always seemed to work great for me.  However, last week I opened up one of many existing projects, (I'm in sample editor).  When I went to add a new plugin to one of the channel strips it would not allow me to.  Also, if I click on any plugin that already exists on the channel strip it dissapears? The strange thing that also happens weather I click to add a new plugin or click on an already existing plugin, is both the  "repeat section" and "crop", buttons from the above menu (in sample editor), the actual buttons become a faded image,(as far as the actual font and images of the buttons).  As soon as I am done clicking to add a plugin on the channel strip, both buttons from the menu  go back to looking normal like all of the other choices from that menu?  I really don't get it?  All I want to do is to be able to add plugins as well as edit or change plugins again. Any thoughts as to why I can no longer add any new plugins to any channel strips?  And why any existing plugins disappear from the channel strip when I click on it?  Why the "repeat section", and "Crop", buttons from the menu above fade in and out when I try clicking on the channel strip is very strange? I don't mind that I just want to be able to add or edit plugins again.  I did do some document cleaning up last week as my memory was getting low.  I then emptied out my trash bin.  I'm hoping I didn't accidentally delete some kind of Logic component?  Why can't I add or edit plugins anymore?  Anyone ever run across this?
    Thanks,
    Mike.

    Mike,
    Are any of your other applications going wonky, or is it just Logic?
    I'm afraid I've never heard of this particular problem before, but if it were happening to me the first thing I would do is delete my "com.apple.logic.express.plist" file in Library>Preferences, then repair permissions in Disc Utility, and finally restart my computer.  Then I would launch Logic and see if the problem has been corrected.  It's amazing how much these two steps can accomplish.
    If that doesn't resolve the issue I would launch Logic and go to Preferences>Audio Units Manager to see if all my plug-ins are properly validated.

  • How to stop Firefox from checking for add-on compatibility every time it opens?

    How to stop Firefox from checking for add-on compatibility every time it opens?

    That can be a problem with the compatibility.ini file in the Firefox profile folder.
    Try to rename (or delete) the compatibility.ini file in the Firefox profile folder to see if that helps.
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    You can also check for problems with preferences.
    Delete possible user.js and numbered prefs-##.js files and rename (or delete) the prefs.js file to reset all prefs to the default value including prefs set via user.js and prefs that are no longer supported in the current Firefox release.
    *http://kb.mozillazine.org/Preferences_not_saved
    *http://kb.mozillazine.org/Resetting_preferences

  • MATERIAL  DOCUMENT TIME OF ENTRY

    Hello,
    Could you help me please with this topic ?
    Our system time zone is CET.
    I have set my user time zone as UTC + 9  as well as my plant Time zone ( UTC +9).
    But while I create a material document, the time of entry displayed on the document is the one of the system.
    What settings should I make to have the user time displayed as date of entry ?
    Thanks in advance for your help

    Hi,
    Please click [for more information|http://help.sap.com/erp2005_ehp_04/helpdata/EN/50/dc9de3122211d3a54fdfb7b31fd578/frameset.htm].
    With Regards,
    Krishna..

  • Date and Time channels in Diadem files

    I'm developing a tool to convert data files from or own format to Diadem data files format, producing a header (.dat) and a binary file (.r64).
    From my source data files, I have to convert a date channel and a time channel. Is there a way to store such channels in binary format (in the .r64 file) ?
    I got the GFS's pdf "Description of the Data formats and File set properties", but I didn't find any info about binary date or time channels.
    Thanks for help.

    Michel,
    The starting point is 01.01.0000 at 00:00:00. This time/date is the value '0'. The DIAdem time channels will be accurate until at least 12/31/2078, starting at 10/15/1582. This is due to changes made to the Gregorian calendar made back in 1582 concerning leap years.
    Today (04/18/2202) at 1:00:00 PM (13:00:00 military time) would be the value 6.31862676E+10. This number represents the number of seconds that have passed since 01.01.0000 at 00:00:00.
    DIAdem provides two functions to convert numbers into time data and time data into numerical data. They are TTR (time to real) and RTT (real to time). The DIAdem help system contains additional information on how to use these functions.
    Let me know if there is any additional information I ca
    n help you with.
    Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • How to Add attachments at the time of Conversion

    Hi all ,
    Is it possible to get the attachments at the time of conversion .
    we want to attach a URL to the trancation at the time of data conversion .
    Example:
    if we are uploading the MM data and we want to have a URl as an attachment for every material can we add it at the time of conversion?
    thanks
    Naval

    Using GOS ...

  • Add air port to time capsule

    add air port to time capsule

    Which AirPort model will you be adding to the Time Capsule network?
    Do you plan to add the AirPort by connecting it using a wired Ethernet connection to the Time Capsule?
    or
    Do you plan to add the AirPort by connecting it wirelessly to the Time Capsule?
    What operating system are you running on your Mac?

  • Show channels with own time channel and different length in one 3D graph

    Hi,
    How can i show channels with own time channel and different length in one 3D graph?
    My consideration looks like this, but i didn't found a solution with acceptable performance. ( i have many channels to merge and many data in them)
    i have 4 Channels 2 with values and 2 with time.
    Example:
    Pair 1:
    1 - 3
    2 - 4
    3 - 5
    4 - 8
    5 - 9
    Pair 2:
    1.5 - 6
    2.3 - 7
    4.5 - 8
    I want than this result:
    1 - 3
    1.5 - null
    2 - 4
    2.3 - null
    3 - 5
    4 - 8
    4.5 - null
    5 - 9
    And
    1 - null
    1.5 - 6
    2 - null
    2.3 - 7
    3 - null
    4 - null
    4.5 - 8
    5 - null
    thanks a lot
    by
    Stefan

    Hi StefanF,
    You need to first create the timebase that you want (in this case with a 0.5 increment) using the "Generate Numeric Channel" ANALYSIS function, then use the resulting time channel in the "Linear Mapping" ANALYSIS function for each of the original channel pairs.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Lmf time channel

    I am using Save LabVIEW Measurement File to get my data into a format Excel opens. One channel souce is an encoder through my serial port. The other is Force cell through my daq board. Signals are displayed on xy graph with the serial signal as x, and force y. Both signals are also graphed independently vs. Time. When I sent these signals into the Save LMF vi, I get no time channel data. I need it. Any help help on where I can import a time channel from? 

    Make certain of is that the Write to LabVIEW Measurement File (WLVM) is set up correctly. One of the options inside of the express vi is for X Value column. This is where the time data is stored. Make sure that the "empty column" is NOT selected.
    What is the source of your time data? Are you getting the time stamps from your serial device? Is the data type of your data being written to your LVM a waveform? If it isn't, you should build the waveform using the "Build waveform.vi". This requires a set of y values, an initial time (t0) and a time between each sample (dt). You can then merge your signals and write them to the LVM. Post if this works. Thanks
    Chris C
    Applications Engineering
    National Instruments
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • Creating a time channel in the data portal and filling it with data - Is there a more efficient way than this?

    I currently have a requirement to create a time channel in the data portal and subsequently fill it with data. I've shown below how I am currently doing it:
    Time_Ch = ChnAlloc("Time channel", 271214           , 1      ,           , "Time"         ,1                  ,1)              'Allocate time channel
    For intLoop = 1 to 271214
      ChD(intLoop,Time_Ch(0)) = CurrDateTimeReal          'Create time value
    Next
    I understand that the function to create and allocate memory for the time channel is extremely quick. However the time to store data in the channel afterwards is going to be highly dependent on the length I have assigned to the Time_Ch. In my application the length of Time_Ch is variable but could easily be in the order of 271214 or higher. Under such circumstances the time taken to fill Time_Ch is quite considerable. I am wondering whether this is the most appropriate way of doing things or whether there is a more efficient way of creating a time channel and filling it.
    Thanks very much for any help.
    Regards
    Matthew

    Hi Matthew,
    You are correct that there is a more efficient way to do this.  I'm a little confused about your "CurrDateTimeReal" assignment-- is this a constant?  Most people want a Time channel that counts up linearly in seconds or fractions of a second over the duration of the measurement.  But that looks like you would assign the same time value to all the rows of the new Time channel.
    If you want to create a "normal" Time channel that increases at a constant rate, you can use the ChnGenTime() function:
    ReturnValue = ChnGenTime(TimeChannel, GenTimeUnit, GenTimeXBeg, GenTimeXEnd, GenTimeStep, GenTimeMode, GenTimeNo)
    If you really do want a Time channel filled with all the same values, you can use the ChnLinGen() function and simply set the GenXBegin and GenXEnd parameters to be the same value:
    ReturnValue = ChnLinGen(TimeChannel, GenXBegin, GenXEnd, XNo, [GenXUnitPreset])
     In both cases you can use the Time channel you've already created (which as you say executes quickly) and point the output of these functions to that Time channel by using the Group/Channel syntax of the Time channel you created for the first TimeChannel parameter in either of the above functions.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

Maybe you are looking for

  • Can't open Photos library, and how to fix it?

    I successfully migrated from iPhoto library to this new Photos Library in April.17th, and everything seems okay except for some minor bugs. but from yesterday on, I started Photos and got this message "Can't open Photos Library, try another." If I tr

  • Apple Mouse (Bluetooth) Problem

    I'm having problems with the tracking on my Bluetooth Apple Mouse and I was wondering if Apple has a manual on this mouse. There is at least one switch on there that I have no idea what it's about. I've fiddled with it and gotten the tracking to work

  • IMovie 11 to iDVD results in pixelation, poor video quality in parts

    I recently created a wedding video in iMovie 11 a burned it to DVD. Video looks like it should except for the "interview" portions where it's extremely pixelated. The audio is fine. These interviews have very little movement and are actually much bet

  • Visibility false or true

    How do I change the visibilty from true to false with 1 of 3 dynamic text fields in a movie clip that is looping. The problem is when you hit the button that would hide the text field, it instantly appears again because the movie clip the text field

  • How can I tell how many bookmarks I have?

    I am setting up my new Galaxy Note 4. I downloaded Firefox and signed in using the same email address I have used to sync all of my computers (Mac's), BUT none of my bookmarks show up on my new Android Note 4. Firefox on my Note 4 looks virgin, as if