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

Similar Messages

  • I have tried to restore from iCloud back on 4 different dates and each time  I get the message can't retore problem with data. Apple support said they can't help ... Anyone got an idea what I can do . Very disappointed !

    How disappointing I can't not restore my phone from any iCloud backups.  Each time it advises that there is a problem with my data.  Spoke direct with apple support and said there is nothing I can do !
    Any help / insight

    How disappointing I can't not restore my phone from any iCloud backups.  Each time it advises that there is a problem with my data.  Spoke direct with apple support and said there is nothing I can do !
    Any help / insight

  • How to open an Existing Excelsheet template and fill it will Data

    Hi All,
    I want to open an Existing Excelsheet template present on my Application or Presentation Server. And then i want to fill this sheet with data present in the system.
    How can i acheive this target. Is it possbile by using OPEN DATASET or do we need to use some other method to achieve this targer?
    <removed by moderator>
    Regards
    PG
    Edited by: Thomas Zloch on Sep 2, 2010 2:03 PM - please do not offer ...

    Hi Rakesh,
    Thanks for the reply.
    The template which i am using to generate the Excel sheet, has got some Logo. After a gap of 3 lines( Rows) , i have got some theree input fields, where i would like to fill some details.
    And after thease three input fields, we a have a gap of 2 lines( Rows) and i need to display a Tabular structure. The row  name of this structure us already defined in Excel sheet and i need to fill this table, with my runtime data.
    So to make a summary, i have already an Template of Excel. But i dont know , how can i access the different areas of this Excelsheet and fill them with data,  without disturbing the existing format.
    Regards
    PG

  • Bookmarks channel in the sample portal desktop

    I've installed the sample portal and created a new organization that uses the sample portal layout. I'm trying to figure out how to add new bookmarks so that any users in my organization get the new bookmarks by default and don't have to add them manually.
    I thought I had already added the new bookmarks but when I log in as a user in my new organization, the new bookmarks do not show up in the Bookmarks channel.
    I must be missing something... here's what I did:
    1) logged in as amadmin
    2) selected Identity Management tab
    3) selected View: Organizations
    4) clicked on the organization name
    5) selected View: Services
    6) clicked show properties for "Portal Desktop"
    7) clicked "Manage Channels and Containers"
    8) clicked "Edit Properties" for the Bookmark channel
    9) clicked on "targets"
    10) clicked "New..." and added two new bookmarks
    11) clicked save
    When I log in as a member of this organization, I don't see the two new bookmarks.

    It turns out that steps 9 and 10 were incorrect. The fix is to modify steps 9 and 10 to:
    9) Click Client=HTML link, then click "targets"
    10) Click new, and change the type from string to un-named string (add the rest of the new entry)

  • How to make a channel as a cetre channel in the sample portal?????

    Hi,
    i have developed a sample channel , i would like to make that as a centre channel in the sample portal.pls any one let me know how to do it
    arun

    I don't quite understand the term "centre channel"
    - however, you can set channel width to "full_top" or "full_bottom",
    - you can set three column layout and have your "thick" channel in the middle.
    - you can have a special "centre channel" tab template
    - and so on...
    Cheers,
    Alex :-)

  • When creating events my calendar has the GMT default and I've done everything to fix it. I need help. It's driving me crazy.a

    Time Zone issue in the calendar.

    ChurchGurl,
    I had the same problem on my newly acquired iPhone 6 as well as my slightly older iPad Mini (2), but the problem did not start until after I set up my iPhone 6 recently. The link (iOS: Troubleshooting issues with date and time - Apple Support) in Jason's response above is good advice and should fix the problem, but then your phone will not automatically adjust time zones if you go from one time zone to another. That may not be a problem much, or at all depending on how much you travel. Something else I noticed is that you are specifically referring to using the Calendar App. Be sure to check Settings > Mail, Contacts, Calendars > Time Zone Override (near the bottom under the "Calendars" section). If Time Zone Override is turned off, "events will display according to the time zone of your current location." I don't know for sure if the "location" it's talking about is determined by the "Time & Date" settings mentioned in Jason's response or some other calculation (GPS, Cell Signal, etc.). I'm thinking that if you turn off the feature to automatically set your time zone, it may affect your calendar as well.
    Possible Alternative Solution...
    My iPhone and iPad calenders sync with my Google Calendar, so this may be a whole different circumstance, although I encountered the same problem you're having where any appointments I created on my iPhone 6 (and suddenly on my iPad Mini as well, which created events properly before) listed the GMT Time Zone instead of my own. I checked the settings mentioned above, and checked the Calendar Time Zone settings directly in my Google account and all was correct... except for the iOS Time Zone issue displayed on the iOS Calendar. So, I created a new event in the iOS Calendar, and when I set the time for the event I made sure to change the Time Zone setting to my current/correct Time Zone, and then hit Done. After doing this a couple of times and changing/correcting the Time Zone each time I created the new appointment, it now uses the correct Time Zone for new events on both my iPhone 6 and on the iPad Mini as well, as if it synchronized the two back to the correct Calendar Time Zone settings. I suspect it had something to do with the fact that I set up a new iPhone on my account recently, but I don't know for sure. One question for you is whether you set up, restored, or added any new iOS devices to your account recently. It may or may not make a difference, but it's worth checking into. Good luck!

  • HOw to create a text file in the given path and delete it after the use?

    Hi all,
    I am trying to create a text file at the given path and delete the created file after the use.
    I am using following code.:
    import java.io.*;
    // write binary data as characters
    public class RanIO {
                                            public static void main(String f[])
                                                      // First illustrate append
                                                      String lineSep = "\n";
                                                      try {
                                                                     File temp= new File("C:/Ash","cute.txt");
                                                      boolean ch=temp.createNewFile();
                                                      if(ch)
                                                           System.out.println("file created");
                                                      else
                                                      System.out.println("file Not created");
                                                      //writing to file
                                                 /*     PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter("cute.txt",true)));
                                                      p.print("Emp NO");
                                                      p.close();*/
                                                                // Open fileWriter in append mode
                                                                               FileWriter fos = new FileWriter(temp, true);
                                                                               BufferedWriter bw = new BufferedWriter(fos);
                                                                               PrintWriter pw = new PrintWriter(fos);
                                                                               double d=550;
                                                                          // lineSep = System.getProperty("line.separator");
                                                                          pw.print("Hello");
                                                                          //pw.print( lineSep );
                                                                          pw.print( d );
                                                                          pw.close();
                                  boolean det=temp.delete();
                                                 if(det)
                                                      System.out.println("File deleted");
                                                 else
                                                      System.out.println("File not deleted");
                                                 } catch (IOException ioe)
                                                                System.out.println( "Append IO error:" + ioe );
    My problem:
    1)
    I am not able to write to the file. I want to know, where i am going wrong.
    It is giving error message like
    "Canot resolve Symbol: temp,"
    But, FileWriter Constructor should accept a File type parameter.
    here temp is a file parameter.
    If i am not using file=new file();
    i can't delete the file after the use. i.e if i use
    PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter("cute.txt",true)));
    how can i delete cute.txt after the use?
    2)
    I am not able to write to the text file. file is created but, a blank file.
    "Hello" is not written into the text file.
    can anyone help me in this regard
    Thanks in advance
    Ashvini

    Thank you Ram,
    But, i want to create a text file in Append mode.
    for that i used
    FileWriter fos = new FileWriter(temp,true); But, it is not accepting FileWriter constructor in
    this format. if i use
    FileWriter fos = new
    FileWriter("c:/ash/cute.txt",true); it works fine. !!!!!Here's the javadoc
    public FileWriter(File file,
    boolean append)
    throws IOExceptionConstructs a FileWriter object given a File object. If the second argument is true, then bytes will be written to the end of the file rather than the beginning.
    Parameters:
    file - a File object to write to
    append - if true, then bytes will be written to the end of the file rather than the beginning
    Throws:
    IOException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
    Since:
    1.4
    Are you using jdk.13 or lower ?
    >
    ONe more doubt, Does flush method deletes a file?
    if not, then i need to use
    File temp=new File("c:/ash/cute.txt");
    FileWriter fos = new FileWriter(temp,true); //which
    is again a problem
    if(temp.delete())
    out.println("File is deleted");
    }I don't know whether i am taking it wrong ! or
    anything wrong with my coding ! but, after creating
    and writing data into a text file. I must delete it
    as it contains confidential informations.
    Regards,
    Thanks.'flush' writes to a file immediately. Else you should explicitly call 'flush' to write contents from buffer to underlying source.
    javadoc again
    PrintWriter
    public PrintWriter(Writer out,
    boolean autoFlush)Create a new PrintWriter.
    Parameters:
    out - A character-output stream
    autoFlush - A boolean; if true, the println, printf, or format methods will flush the output buffer
    cheers,
    ram.
    Question; What do you gain by opening a file, writing to it and deleting it in the same program ?

  • Difference between using the Enterprise Portal and SAP GUI

    Hi Gurus,
    Could one of you please send me a document that lists the differences between the Enterprise Portal and SAP GUI?
    thanks in advance

    Hi,
    For groups, managedBy is an administrative convenience to designate “group admins”. Whatever principal listed in
    managedBy gets permission to update a group’s membership (the actual security is updated on the group’s AD object to allow this).
    In Win2008 and later managedBy also became the way you delegated local administration on an RODC, allowing branch admins to install patches, manage shares, etc. (http://technet.microsoft.com/en-us/library/cc755310(WS.10).aspx). 
    On the RODC, this is updating the RepairAdmin registry value within RODCRoles.
    So the difference between them should be only the way they do the same thing.
    For more details, please refer to the below article:
    http://blogs.technet.com/b/askds/archive/2011/06/24/friday-mail-sack-wahoo-edition.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • The ipad won't sync some photos, saying the file can't be read by the ipad, however it will sync some photos taken at the same time which are the same size and file type.  Why does it reject some and accept others?

    The ipad won't sync some photos, saying the file can't be read by the ipad, however it will sync some photos taken at the same time which are the same size and file type.  Why does it reject some and accept others?

    Hi there. I'm having the same problem: my iPad won't import some photos from a folder, saying that they can't be read. They are all JPEGS and some photos taken at the same time have synched fine, but out of a folder with 200 photos, it only lets me synch 37. I'm synching albums created via Photoshop Elements 6, which has worked fine until now.
    I've tried deleting all photos and re-synching, and have also deleted the iPod Photo Cache, but it hasn't made a difference.
    The iPad auto-updated to the latest version of iTunes, so maybe that's what's causing it?
    Any advice gratefully received!

  • I backed up all of my data on my laptop and uploaded songs as well, I then plugged my wifes' phone to upload the music to her device, my laptop then erased all her data (photos, videos etc) and replaced it with mine, is there a way I can restore it all?

    Good day
    I synced my iPhone4s with my laptop and loaded music on it, I then tried to upload the music from the same computer to a different iPhone4s and it deleted all the photos and data and replaced it with mine, is there a way to recover the lost data and photos?
    Please help!?

    You can only sync to one computer at a time. Changing the computer will erase all data on the device and replace it with the content of the new iTunes library. Only if you can restore from the latest backup of your wife's phone, you can get the data back.
    iTunes: Restoring iOS software
    iTunes: About iOS backups

  • What is the best wayt to copy tables with data from development to Prod?

    Dear all,
    We have Oracle tables with data in a development server, I would like to know if there is any ‘easy’ and ‘direct’ way to copy them to the production server.
    As I think import and export would be the best way. Any other althernatives?
    Thanks.

    There are a number of methods you could use.
    <ul><li>
    Export and import would work or their 10g+ equivalents data pump. </li>
    <li>You could create a database link between the 2 databases and use SQL*Plus copy to transfer data on a table by table basis (probably quite laborious unless there's only a few tables). </li>
    <li>You could use transportable tablespaces (there are some restirctions - check the documentation http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/tspaces013.htm#sthref1632) </li>
    <li>You could use RMAN to clone the development database (assuming the prod database hasn't been used yet and that there's nothing in it you need to keep).</li>
    <li>You could create the prod database as a standby copy of the dev database </li>
    </ul>
    Using transportable tablespaces would be much faster than using data pump or import/export depending on how much data there is.

  • My IPhone, after synching the last few times, has inherited both my husband and my daughter's music libraries.  How do I un do this?

    My IPhone, after synching the last few times, has inherited both my husband and my daughter's music libraries.  How do I un-do this and keep this from happening in the future?

    1) You asked "Does she need to reconnect to that itunes/computer and if so what do we need to do to remove this folder of pics from her ipod?" Yes, you have to connect the iPod to that computer and go to the Photos pane for the iPod in iTunes and uncheck sync photos and the click on synce/apply. In the future do not check sync photos.
    iOS and iPod: Syncing photos using iTunes
    2)
    Create a NEW account for using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    Then on the iPod go to
    - Settings>Messages>Send and receive and sign out your ID and sign into hers. Make sure that only her ID email address is listed.
    - Settings>FaceTime sign out of your ID and sign into hers. Make sure that under You can be reached at only her ID email address is listed
    - Settings>iCloud and sign out and sign in with hers
    Contnue to use the commpn ID/account for Settings>iTunes and App stores.

  • Create prompt with date-filter and initialize it with current date

    Oracle BI 11 g
    Hi!
    I need to create dashboard prompt with date-filter and initialize it with current date. How can I do that?
    I tried to create repository initialization block and add variable. But I don't know what should I write to DataSource? I tried to use functions Now(), Current_Date, sysdate (for example, SELECT Now() FROM tbl_Calendar) but without results - when I pressed "Test..." button I got errors - something like "Now() is unknown function" or "Incorrect syntax near key word Current_Date".
    After that I tied to use Presentation Variable in Prompt, but also without success ((
    Please, help me.

    I've created Repository Variable "CurrentDate", using SQL-query like this "select convert(varchar(10), getdate(), 104)" and now this variable is being initialized by value "07.04.2011". But I don't understand how to use this varible in DashboardPrompt! What item in list "Default selection" I should choose - "Variable Expression", "Server Variable" or something else? When I chose "Variable Expression" and write "CurrentDate" I got just string "CurrentDate" when preview Prompt. @{CurrentDate} gave me the same result.

  • Run the data copy and comments copy with the same key

    I want to Run the data copy and comments copy with the same key.
    I tried to challenge in the following way, but it is an error.
    1. Add the process in the process chain [/ CPMB / COPY] process in the process chain that could be new to copy the chain [/ CPMB / COPY_COMMENTS] (see capture)
    2. Select the newly can process chain to add a package, make a change to the script as follows:
    PROMPT(RADIOBUTTON,%TARGETMODE%,"Handling of records",0,{"Copy records with match key","Copy by replacing data in same data region of Entity, Category, Time and Audit ID"},{"0","2"})
    PROMPT(RADIOBUTTON,%RUNLOGIC%,"Select whether to run default logic for stored values after copying",0,{"Yes","No"},{"1","0"})
    PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when importing data.",1,{"Yes, check for work status settings before importing","No, do not check work status settings"},{"1","0"})
    PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Select the members to COPY and where to",%DIMS%,0)
    INFO(%TEMPNO1%,%INCREASENO%)
    INFO(%ACTNO%,%INCREASENO%)
    INFO(%SELECTION_KEYDATE%,)
    TASK(/CPMB/COPY_COMMENTS,SELECTION,%SELECTION%)
    TASK(/CPMB/COPY_COMMENTS,TOSELECTION,%TOSELECTION%)
    TASK(/CPMB/COPY_COMMENTS,CHECKLCK,%CHECKLCK%)
    TASK(/CPMB/CM_CONVERT,OUTPUTNO,%TEMPNO1%)
    TASK(/CPMB/CM_CONVERT,ACT_FILE_NO,%ACTNO%)
    TASK(/CPMB/CM_CONVERT,SAPPSET,%APPSET%)
    TASK(/CPMB/CM_CONVERT,SAPP,%APP%)
    TASK(/CPMB/CM_CONVERT,SELECTION,%SELECTION%)
    TASK(/CPMB/CM_CONVERT,TOSELECTION,%TOSELECTION%)
    TASK(/CPMB/CM_CONVERT,KEYDATE,%SELECTION_KEYDATE%)
    TASK(/CPMB/CLEAR_SOURCE_CUBE,CHECKLCK,1)
    TASK(/CPMB/CLEAR_SOURCE_CUBE,SELECTION,%TOSELECTION%)
    TASK(/CPMB/CLEAR_SOURCE_CUBE,KEYDATE,%SELECTION_KEYDATE%)
    TASK(/CPMB/CLEAR_SOURCE_CUBE,DUMPLOADMODE,3)
    TASK(/CPMB/APPEND_LOAD,PREPROCESSMODE,0)
    TASK(/CPMB/APPEND_LOAD,TARGETMODE,0)
    TASK(/CPMB/APPEND_LOAD,INPUTNO,%TEMPNO1%)
    TASK(/CPMB/APPEND_LOAD,ACT_FILE_NO,%ACTNO%)
    TASK(/CPMB/APPEND_LOAD,RUNLOGIC,1)
    TASK(/CPMB/APPEND_LOAD,CHECKLCK,1)
    TASK(/CPMB/APPEND_LOAD,KEYDATE,%SELECTION_KEYDATE%)

    We performed similar transfer of data from one planning model to another using DM package linked to BADI. In your scenario there is additional complexity of doing lookup from DSO and should be possible.
    Also check these references for performing lookup in DSO.
    abap code to populate data from DSO
    something about SAP: How to look for DSO&amp;#8217;s tables?

  • Time difference between the Identity system and Access System: OAM

    I was installing OAM. Performed the below steps.
    -installed identity server
    -installed webpass
    -setup of identity system console
    -installed policy manager
    -setup of access system console
    The above steps were successfull. Then when i was logging into Access system console, i am getting the below error:
    Error:there was a problem obtaining the userid. One possible reason for this is a time difference between the Identity system and Access systems (Policy Manager and Access system console).+
    The Identity Server, WebPass and Policy Manager are installed on the same machine.
    Userdata repository: OVD 10.1.4.3
    Policy and Config Data Repository: OID 11.1.1.3
    OAM: 10.1.4.3
    Windows2008 - 64bit
    Found document in metalink similar to this issue. suggested to change ldapmaxofreties. but didn't help.
    Any idea on this error. Please Advise.
    Thanks in advance.

    Try this::
    Check Time Difference Between Identity and Access Manager Systems
    Check the logfile in the Access Manager install directory. The default location is <$AMinstall_dir>/access/oblix/logs/oblogfile.
    If the file exists and it contains following line "skew = slack = " that means the Identity and Access Manager Web Servers are on different machines and have not synchronized time within a minute.
    Either synchronize times between the two machines within a minute's accuracy or you can increase the slack by modifying these two files: <$AMinstall_dir>/access/oblix/apps/common/bin/oblixbaseparams.lst: loginslack: <$IMinstall_dir>/identity/oblix/apps/common/bin/oblixbaseparams.xml: loginslack: where numofseconds is more than skew found in the oblogfile.
    For example, if you have following line in oblogfile "skew = 121 slack = 60", set numofseconds in the two parameter files to 130. After doing this, Stop the Identity Manager Web Server. Then stop the Identity Server. Start the Identity Server.
    Then start the Identity Manager Web Server. Start a new browser session and see if you get the same error.

Maybe you are looking for

  • Amount of records loaded to dso is not same as in psa

    i performed a loading from psa to dso. i have 2 datasource under this dso, the amount of records loaded from psa for this 2 datasources to dso is not consistent. the psa for the 1st datasource having 3k records and the 2nd datasource having 5k record

  • New Mac Mini + 30" Apple Display = 1280x800??

    I'm a long time Apple user and Apple developer. So I just bought a new Mac Mini (Macmini3,1) assuming, perhaps foolishly, it would simply plug into my Apple 30" display and I'd be able to get native resolution. Unfortunately, 10.6.1 on the Mini only

  • IMic and OS X

    I picked up an iMic a couple of weeks ago. And set up was a snap. Shows up in System Prefs / Sound, with the level control. And sound was fine. I haven't used it in about a week and half. And couple of days ago, it no longer works properly (used it w

  • Same application that works on different database user

    I have an application wiritten in htmldb 1.6 taht create areport on a table. But on the database i have a lot of different user (each table of each user have different information) Can i use the same application with connection on differnet user??? T

  • Moving Texts from 6500 to 6700

    I have recently upgradedgrom a 6500 to a 6700, however want to move my SMS messages across keeping the original time/date stamp on them.  Any ideas? i have tried the phone to phone bluetooth facility but that changes the time/date to the current time