Help Needed.. Creating custom calendar problems

I am trying to create a calendar like this
DateRun Shift
10/27/2004 06:30 A
10/27/2004 18:30 B
10/28/2004 06:30 C
10/28/2004 18:30 D
and so on.. except that there is a small login inside for day when it is Thursday. One week Shift 'A' works and the next week Shift 'B' works..
Here is the procedure; Appreciate your help immediately.,..
CREATE OR REPLACE procedure create_calendar as
STARTDATE VARCHAR2(20);
shifter1 varchar2(5);
shifter2 varchar2(5);
shiftcycle number;
counts number;
begin
startdate := '11/09/2000';
counts:= 0;
shiftcycle:= 14;
delete from calendar;
commit;
for counts in 0..1000
loop
dbms_output.put_line(counts);
if to_char(sysdate + counts,'DAY') = 'MONDAY' or to_char(sysdate + counts,'DAY') = 'TUESDAY' or to_char(sysdate + counts,'DAY') = 'WEDNESDAY'
then
dbms_output.put_line('Code in here 1');
shifter1:= 'A';
shifter2:= 'B';
insert into calendar (daterun, shift) select to_char(sysdate + counts,'mm/dd/yyyy') || ' 06:30',shifter1 from dual;
insert into calendar (daterun, shift) select to_char(sysdate + counts,'mm/dd/yyyy') || ' 18:30',shifter2 from dual;
elsif to_char(sysdate + counts,'DAY') = 'THURSDAY' and mod((to_char(sysdate + counts,'mm/dd/yyyy') - startdate),shiftcycle) = 0
then
dbms_output.put_line('Code in here 2');
shifter1:= 'A';
shifter2:= 'B';
insert into calendar (daterun, shift) select to_char(sysdate + counts,'mm/dd/yyyy') || ' 06:30',shifter1 from dual;
insert into calendar (daterun, shift) select to_char(sysdate + counts,'mm/dd/yyyy') || ' 18:30',shifter2 from dual;
elsif to_char(sysdate + counts,'DAY') = 'THURSDAY' and mod((to_char(sysdate + counts,'mm/dd/yyyy') - startdate),shiftcycle) <> 0
then
dbms_output.put_line('Code in here 3');
shifter1:= 'C';
shifter2:= 'D';
insert into calendar (daterun, shift) select to_char(sysdate + counts,'mm/dd/yyyy') || ' 06:30',shifter1 from dual;
insert into calendar (daterun, shift) select to_char(sysdate + counts,'mm/dd/yyyy') || ' 18:30',shifter2 from dual;
elsif to_char(sysdate + counts,'DAY') = 'FRIDAY' or to_char(sysdate + counts,'DAY') = 'SATURDAY' or to_char(sysdate + counts,'DAY') = 'SUNDAY'
then
dbms_output.put_line('Code in here 4');
shifter1:= 'C';
shifter2:= 'D';
insert into calendar (daterun, shift) select to_char(sysdate + counts,'mm/dd/yyyy') || ' 06:30',shifter1 from dual;
insert into calendar (daterun, shift) select to_char(sysdate + counts,'mm/dd/yyyy') || ' 18:30',shifter2 from dual;
end if;
--exit when counts >1000;
end loop;
commit;
end create_calendar;

You don't say what your problem is, so it is kind of difficult to help.
As a guess, I would say that your code only inserts rows for Wednesdays. TO_CHAR(date, 'DAY') returns a string padded with spaces to the length of the longest day name, in English, that is Wednesday (9 characters).
SQL>DECLARE
  2     x DATE := sysdate;
  3  BEGIN
  4     IF TO_CHAR(x, 'DAY') = 'THURSDAY' THEN
  5        DBMS_OUTPUT.Put_Line('Is Thursday');
  6     ELSE
  7        DBMS_OUTPUT.Put_Line('Is Not');
  8     END IF;
  9
10     IF TO_CHAR(x, 'DAY') = 'THURSDAY ' THEN
11        DBMS_OUTPUT.Put_Line('Now it is Thursday');
12     ELSE
13        DBMS_OUTPUT.Put_Line('No it is not!');
14     END IF;
15  END;
16  /
Is Not
Now it is ThursdayTTFN
John

Similar Messages

  • Need help in creating custom crosstab reports

    Hello
    I need some help in creating custom crosstab reports.
    My current report shows the number of events that have occured over the time in a day
    The events and the eventdetails are read from the database before being printed on the crosstab
    i.e something like this.
    Note : there are no events between 3:00-3:59,5:00-5:59;6:00-6:59,7:00-7:59  (not present in the database)
    hence not displayed in the reports
    *08/07/2009*         01:00        02:00         04:00          08:00          10:00*
    Event X                    1               1                 4                 1                  3
    Event Y                   3               3                 2                 2                  1
    Total                        4                4                 6                 3                  4
    So far so good...
    Now i have to enhance my reporting application to include the event details which have not happened i.e to include the time details in the crosstab reports where no events have happened
    08/07/2009             01:00        02:00         03:00          04:00          05:00         6:00         07:00         8:00     9:00     10:00
    Event X                     1               1                0                 4                  0             4             0                1            0           3
    Event Y                     3               3                0                 2                  0             2             0                2            0           1
    Total                         4                4                0                 6                  0             6             0                3            0           4
    I have fell short of ideas this time around to implement such a thing
    Any help in this direction is deeply appreciated
    Regards
    Srivatsa
    Edited by: Srivatsa HG on Jul 8, 2009 10:56 AM

    Hi,
    It seems that you are having issue with Crystal Report Design.
    Post your question in [Crystal Report Design Forum|SAP Crystal Reports;
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all Design queries remain in one place and thus can be easily searched in one place.
    Regards,
    Shweta

  • How to create custom calendar in webdynpro ABAP.....(WDA)

    Hi,
    How to create custom calendar in Webdynpro Abap ?.
    Regards,
    Narasimha

    The best way I see here is to develop your custom calender in any of the UI technologies supported like Flash (flex) or HTML5 (or maybe even SilverLight? not sure) and embed it in your WD view. You can also handle interactions between the embedded component and the WD controller.
    Regards,
    Raghavendra

  • Need help in creating custom reports

    hello,
    I am using EM 10.2.0.2 on windows 32-bit.
    All EM components are installed on a single machine.
    Have installed AGENT 10.1.0.5 for managing targets which are on LINUX 2.1
    Please help me in getting the solution for the following queries:
    (a)I need to create a custom report regarding the CAPACITY MANAGEMENT .
    (b)I have some UDM defined but I am not able to use these UDM while creating custom report.
    (c)Also is there any possibility that we can use views other than REPOSITORY VIEWS. What I meant was : instead of using REPOSITORY VIEWS can we use the tables of the target instances.
    Thanks in advance.

    Same post
    Need help on repository views for creating custom capacity planning reports

  • Need Help while Creating Customized Cubes

    while creating customized cubes i have some problem. please clarify this.
    i have 10 Characteristics and 5 KF's.
    while creating IC assign the characteristics to the dimension.
    is there any proposed rule for assinging the char to dimension or i can assign randomly.
    regards
    magesh

    Hi magesh,
    You should assign related characteristics to the same dimension.
    Ex: salesregion, sales off and sales rep to the same dimension say " sales".
    I.e., when the characteristics have some relationship like <b>one to many</b> you should assign them in the same dimension.
    Take an ex of customerid and prodid..they have many to many relationship.In such case go for separate dimensions.
    And if the characteristic is of type salesorder which has many distinct entries in fact table, go for line item dimensions.
    <b>Note:</b> In line item dimension, you can include only one characteristic.
    Hope its helpful
    Shylaja.

  • Help needed regarding custom reports

    hello,
    I am using EM 10.2.0.2 on windows 32-bit.
    All EM components are installed on a single machine.
    Have installed AGENT 10.1.0.5 for managing targets which are on LINUX 2.1
    Please help me in getting the solution for the following queries:
    (a)I need to create a custom report regarding the CAPACITY MANAGEMENT .
    (b)I have some UDM defined but I am not able to use these UDM while creating custom report.
    (c)Also is there any possibility that we can use views other than REPOSITORY VIEWS. What I meant was : instead of using REPOSITORY VIEWS can we use the tables of the target instances.
    Thanks in advance.

    You might want to try posting your question to the Grid Control Forum.
    Enterprise Manager

  • Help with creating a calendar?

    I am trying to make a calendar, but when I push the create button nothing happens!! I have tried 2 ways, one making a album of the pics I want then creating the calendar, but I only get as far as selecting the type of calendar nothing else. Then creating the calendar without pics and the same thing happens. Any susggestions would be great!!

    Heads up Jacobe10,  I spent some time creating a calendar in iphoto.  Clicked on the buy button.  Now the whole program is stuck.  Can't shut down the computer or iphoto.  I'm thinking there might be problem with the program.

  • Need help with creating custom form

    hi all,
    i'm working on creating a new form. it has 2 blocks for 2 tables. headers and lines tables. the headers table mostly have columns that are id's from other tables. i.e. customer_id, location_id etc.. in my screen, obviously i would not show the id's. i'll display the descriptions / names of the id's instead like customer_name for customer_id... but in order to do this i created a table that joins more than 2 tables. so in the block query data source name, i enter the name of this view.. then i add a ON-INSERT, ON-UPDATE, ON-DELETE triggers at block level and i call the corresponding package which does the insert, update and delete. i'm able to insert but update and delete causes a problem. "ORA-01445: cannot select ROWID from, or sample, a join.. ".. i'm thinking the reason is that when the form does an update or delete, it locks the record which causes the error.. also the reason i need the view is because i need to be able to query the customer_name in the screen instead of the customer_id... what i can't figure out is how i can make this work... or a work-around may be...
    can anyone help.
    thanks

    Matt Rasmussen wrote:
    You're right that the form is locking the record so you just need to control how it locks the record with an on-lock trigger. From the Oracle Applications Developer's Guide:
    page 3-9:
    When basing a block on a view, you must code ON–INSERT, ON–UPDATE, ON–DELETE, and ON–LOCK triggers to insert, update, delete, and lock the root table instead of the view.
    Most of the on-lock triggers I have written follow this template:
    <pre>     SELECT     field1, field2, field3
         INTO     :block.field3, :block.field2, :block.field3
         FROM     view
         WHERE     rowid = :block.row_id
         FOR UPDATE OF field1, field2, field3;</pre>
    I think once you've added this trigger, your form will work the way you want it.hi,
    i tried your suggestion but still get the same error.. anyways, here are the details of what i have so far.
    here's my table.
    CREATE TABLE XXPN_VR_VOL_HEADERS_ALL
      VOL_HEADER_ID     NUMBER,
      CUSTOMER_ID       NUMBER,
      LEASE_ID          NUMBER,
      LOCATION_ID       NUMBER,
      VAR_RENT_ID       NUMBER,
      PERIOD_SET_NAME   VARCHAR2(15 BYTE),
      PERIOD_NAME       VARCHAR2(15 BYTE),
      IMPORT_FLAG       VARCHAR2(1 BYTE),
      IMPORT_DATE       DATE,
      CALC_TYPE         VARCHAR2(30 BYTE),
      PASSTHROUGH_FLAG  VARCHAR2(1 BYTE),
      COMMENTS          VARCHAR2(2000 BYTE),
      CREATED_BY        NUMBER,
      CREATION_DATE     DATE,
      LAST_UPDATED_BY   NUMBER,
      LAST_UPDATE_DATE  DATE
    );here's my view.
    create or replace view xxpn_vr_vol_headers_v ( row_id
                                                  ,vol_header_id
                                                  ,customer_id
                                                  ,customer_name
                                                  ,lease_id
                                                  ,lease_name
                                                  ,lease_number
                                                  ,location_id
                                                  ,location_code
                                                  ,var_rent_id
                                                  ,var_rent_number
                                                  ,period_set_name
                                                  ,period_name
                                                  ,import_flag
                                                  ,import_date
                                                  ,calc_type
                                                  ,passthrough_flag
                                                  ,created_by
                                                  ,creation_date
                                                  ,comments
                                                  ,last_updated_by
                                                  ,last_update_date )
    as
      select xvvha.rowid
            ,xvvha.vol_header_id
            ,xvvha.customer_id
            ,hp.party_name
            ,xvvha.lease_id
            ,pl.name
            ,pl.lease_num
            ,xvvha.location_id
            ,loc.location_code
            ,xvvha.var_rent_id
            ,pvr.rent_num
            ,xvvha.period_set_name
            ,xvvha.period_name
            ,xvvha.import_flag
            ,xvvha.import_date
            ,xvvha.calc_type
            ,xvvha.passthrough_flag
            ,xvvha.created_by
            ,xvvha.creation_date
            ,xvvha.comments
            ,xvvha.last_updated_by
            ,xvvha.last_update_date
        from xxpn_vr_vol_headers_all xvvha
            ,hz_parties hp
            ,pn_leases_all pl
            ,pn_locations_all loc
            ,pn_var_rents_v pvr
       where -1 = -1
         and xvvha.customer_id = hp.party_id (+)
         and xvvha.lease_id = pl.lease_id (+)
         and xvvha.location_id = loc.location_id (+)
         and xvvha.var_rent_id = pvr.var_rent_id (+);here's my ON-UPDATE trigger block level
    begin
      xxpn_vr_vol_data_pkg.update_vr_vol_hdr_data ( p_vol_header_id     => :XXPNVRVOLHDRS.vol_header_id
                                                   ,p_customer_id       => :XXPNVRVOLHDRS.customer_id
                                                   ,p_lease_id          => :XXPNVRVOLHDRS.lease_id
                                                   ,p_location_id       => :XXPNVRVOLHDRS.location_id
                                                   ,p_var_rent_id       => :XXPNVRVOLHDRS.var_rent_id
                                                   ,p_period_set_name   => :XXPNVRVOLHDRS.period_set_name
                                                   ,p_period_name       => :XXPNVRVOLHDRS.period_name
                                                   ,p_import_flag       => :XXPNVRVOLHDRS.import_flag
                                                   ,p_passthrough_flag  => :XXPNVRVOLHDRS.passthrough_flag
                                                   ,p_comments          => :XXPNVRVOLHDRS.comments
                                                   ,x_last_updated_by   => :XXPNVRVOLHDRS.last_updated_by
                                                   ,x_last_update_date  => :XXPNVRVOLHDRS.last_update_date );
    end;here's my code in ON-LOCK trigger block level
    begin
      select lease_id
            ,lease_name
            ,lease_number
            ,location_id
            ,location_code
            ,customer_id
            ,customer_name
            ,var_rent_id
            ,var_rent_number
            ,period_name
            ,comments
            ,period_set_name
            ,import_flag
            ,passthrough_flag
            ,created_by
            ,creation_date
            ,last_updated_by
            ,last_update_date
        into :XXPNVRVOLHDRS.lease_id
            ,:XXPNVRVOLHDRS.lease_name
            ,:XXPNVRVOLHDRS.lease_number
            ,:XXPNVRVOLHDRS.location_id
            ,:XXPNVRVOLHDRS.location_code
            ,:XXPNVRVOLHDRS.customer_id
            ,:XXPNVRVOLHDRS.customer_name
            ,:XXPNVRVOLHDRS.var_rent_id
            ,:XXPNVRVOLHDRS.var_rent_number
            ,:XXPNVRVOLHDRS.period_name
            ,:XXPNVRVOLHDRS.comments
            ,:XXPNVRVOLHDRS.period_set_name
            ,:XXPNVRVOLHDRS.import_flag
            ,:XXPNVRVOLHDRS.passthrough_flag
            ,:XXPNVRVOLHDRS.created_by
            ,:XXPNVRVOLHDRS.creation_date
            ,:XXPNVRVOLHDRS.last_updated_by
            ,:XXPNVRVOLHDRS.last_update_date
        from xxpn_vr_vol_headers_v
       where rowid = :XXPNVRVOLHDRS.ROW_ID
         for update of lease_id
                      ,lease_name
                      ,lease_number
                      ,location_id
                      ,location_code
                      ,customer_id
                      ,customer_name
                      ,var_rent_id
                      ,var_rent_number
                      ,period_name
                      ,comments
                      ,period_set_name
                      ,import_flag
                      ,passthrough_flag
                      ,created_by
                      ,creation_date
                      ,last_updated_by
                      ,last_update_date;
    end;properties for the block
    Query Data Source Type: Table
    Query Data Source Name: XXPN_VR_VOL_HEADERS_V
    DML Target Type: Table
    DML Target Name: XXPN_VR_VOL_HEADERS_V
    i'd appreciate any help.
    thanks

  • Need help on creating custom skins like chrome

    Hi,
    I want to create my custom skin like chrome with my own play, pause and seek buttons. Can anybody point me to any documents that can help me to achieve this? Thanks in advance.
    Regards,
    Amit

    Thats a very open ended question. We have built a sample OSMF player and a skinning solution you can take a look at.  http://code.google.com/p/reops/
    There are templates and a PDF that describes the capabilities and process. Also walkthrough style samples.
    Otherwise the generic answer is desgn as you see fit, and implement the controls as display objects or part of the MediaContainer which could be done as custom MediaElements, then link them to the MediaPlayer or MediaPlayerSprite and call the approp API methods (play/pause/stop/seek/etc.)

  • Need help on creating customized visual datagrid

    Hi all,
    I am new to Flex and just downloaded the trial version of
    Flex Builder 3 to test it.
    Basically, what I need is a visual representation of some
    XML-data from a web-server.
    I have managed to use a HttpService-object to import the
    XML-file and also succesfully been able to show the data in a
    DataGrid.
    What I want now is to show the XML data in another visual
    context. I want some child elements in the XML-file to float in the
    Flex-page as graphical "bubbles" that floats around, so the user
    can click on one of them to select the specif child element in the
    XML-file.
    Have anyone of you guys any experience on how to make that
    possible? Any links to any resources etc?
    Thank you very much in advance,
    Lasse
    Denmark

    Hi Sreenivas,
    Thank you for your response!
    I've been taken a look on the Bubble Charts diagram, but that
    is not really what I am looking for.
    What I need is some bubbles floating randomly on the screen
    (perhaps moving around). From what I can see, the Bubble Charts
    diagram requires some predifined data to construct the position og
    size - I want that to be randomized (without the possibility that
    the bubbles float into each other).
    Can anybody help on that? Please let me know if the problem
    is not described clearly.

  • Help needed with missing data problem in CRVS2010

    We recently upgraded the reporting engine in our product to use Crystal Reports for Visual Studio 2010 (previously engine was CR9). Our quote report, which has numerous subreports and lots of conditional formatting, started losing data when a quote took more than a single page to be printed. We knew the SQL results included the data, but the report was not printing those lines at all or sometimes printing a partial line. In addition, the running total on the report would exclude the lines that were being missed on the next page. In one example submitted by a customer, 3 lines were skipped between pages.
    I think I have identified two potential issues that document the possibility of data not being included in the report.
    The first potential issue is an issue with the "suppress blank section" option being checked. This issue is supposedly fixed with ADAPT01483793, being released someday with service pack 2 for CRVS2010.
    The second potential issue is using shared variables. This issue is supposedly fixed with ADAPT01484308, also targeted for SP2.
    Our quote report does not explicitly use shared variables with any of the subreports, but it does have several subreports, each in its own section that has the "supress blank section" option checked. We have other reports that use this feature, as well, and they are not exhibiting the problem.
    One different thing about the quote report is that it has a section with multiple suppression options selected. The section has a conditional suppression formula, which controls whether the section is included at all within the report. The section also has the suppress blank section option selected. There are multiple fields within the report that are each conditionally suppressed. In theory, the section's suppress formula could evaluate to true, yet all of the fields within the section are suppressed (due to null values), and then the "suppress blank section" option would kick in.
    The missing data only seems to happen when the section is not being suppressed, and at least one of the fields is being included in the report. If I clear the "suppress blank section" check box, and change the section formula to also include the rules applied to the fields in the section, the missing data problem seems to be resolved.
    Is this related to ADAPT01483793? Will it be fixed in service pack 2?
    If more details are needed, I would be happy to provide a sample report with stored data.

    Hi Don,
    Have a look at the Record Selection formula in CR Designer ( stand alone ) and when exported to RPT format opening that report in the Designer also. 
    There's been a few issues with => logic in the record selection formula. It could be you are running into this problem. Look for NOT inserted into your selection formula.
    Oh and SP2 is coming out shortly so it may resolve the issue. But if you want you could purchase a support, or if you have a support contract then create a case in SMP and get a rep to work with you to debug the issue.
    If you have not try the Trial Version of CR 2011, put it on a VM-ware image or Test PC so you don't corrupt anything for production and have a look at and test it in that designer also. If you purchase a case and it is a bug then you'll get a credit back for the case.
    Don
    Edited by: Don Williams on Oct 26, 2011 7:40 AM

  • Help needed with a layout problem

    I'm trying to build a JTabbedPane where each tab has a grid of buttons. The number of buttons is variable, and I'd like the buttons to flow sort of like with FlowLayout, with four columns. I need all the buttons to be the same size, even across tabs. I tried GridLayout, which doesn't work when I have too few buttons to fill a row. It fails in different ways, depending on how I set things up. If I try to set the layout to GridLayout(0, 4) (four columns), then if one tab has one row and another has two, the buttons on the one-row tab expand vertically to the height of the two-row tab. If I try GridLayout(2,4), then if a tab has only one button, it expands horizontally to the maximum width of any of the tabs. (It also has the further problem that if the maximum number of buttons on any tab is 6, they are placed in a 2x3 array; I'm trying to get them to be 4 buttons on the first row and 2 on the second.)
    I'm hoping there's a standard layout manager that can do the job, but I'm not too familiar with the Swing manager classes. Can I get what I want without writing my own layout manager?
    Thanks,
    Ted Hopp
    [email protected]

    I didn't think it was specifically a Swing question.Well, its either Swing or AWT, people who develop GUIs are the ones who are going to have experience using layout managers.
    but if someone can point the way to how to do this with GridBagLayout, nested containersSince you finished reading the tutorial, what have you tried? You've explained your problems using a single layout manager, so what problems are you having using nested layout managers?
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • Help needed with C3 calendar

    Hi can anyone help me.  I use my calendar all the time and most of the time it is fine. But 2 to 3 times a week the first calendar reminder for that day will go off at mid-night and then again at the correct time.  Does anyone know a fix for this as it is driving me mad.  Thanks.

    Hi just read messages about the calendar alarm problems, I have the same problem. Bought my C3 Nov'11 and from day 1 the calendar has sounded at midnight but it is entirely random - never the same day or event. I took it back to Carphone Warehouse and they looked at me like I was mad. 
    This problem has now progressed to not sounding alarms at all throughout the day but will sound them ALL at midnight plus the complete list for the following day, this has happened twice. I need calendar alarms as I have a poor memory and need to take medication at specific times, amongst other things.
    My previous phone was a Nokia which I had for 5yrs with no problems at all.
    In recent weeks my C3 has developed other problems too.
    1) while texting it changed to a multimedia text but when I tried to go 'back' it went blank, froze then turned off, but this could have been me, this has only happened once.
    2) the phone sounds an alarm when there isn't one set, the only way to exit it is to turn the phone off. happened 3 times
    3) the phone re-sets the day - not helpful when you have a memory problem, it always goes back a day.  Happen 3 times.
    4) part way through the day the phone tones re-set to factory settings, so I'm ignoring them. Happen twice. I don't always feel the vibrating alert.
    This phone is driving me mad yet I had no problems with my old one until it died.
    Any help would be gratefully received as the topic hasn't been up-dated in a while

  • Urgent help needed -in customizing an OAF page --adding new button?

    Hi,
    We are currently implementing an OAF based oracle application.One of the requirements that the customer has is to display an additional button on the page button bar available out of box in an OAF page. This button needs to be enabled/disabled based on certain conditions. Also when the button is pressed a pl/sql api needs to be invoked. I know through personalization a new button can be created in the page button bar. But how do we handle the logic behind the button? Can we extend the page level controller?Will this survive future upgrades? If not then what is the alternative?
    Please help!
    Thanks!

    You can follow the thread Calling PL/SQL Procedure for pl/sql call from controller example.
    --Shiv                                                                                                                                                                                                                                                                                   

  • HELP NEEDED CREATING VI WITH POTENTIOMETER

    Hi Everyone,
    I have a DAQ 6009, linear potentiometer and a spring.
    I want to measure the displacement of a spring using the linear pot and correspond this displacement into a force by multiplying by spring constant k. (F=-k.x)
    F=force, k = spring constant, x = displacment
    I need to create a VI that will,
    Take voltage readout of potentimeter and correspond it to  0-110mm displacement of spring. ie 0V=0mm, 5V =110mm.
    Multiply the displacement mm by k (which is 25).
    Record values into excel file and display when stop button is pressed.
    Record peak force (amplitude).
    When the pot is fully extented it would correspond to 0mm/0V.
    Please find attached current Labview VI and linear pot.
    As you can see it is multiplying the voltage reading by 25, I want to correspond this voltage to a displacment and then multiply by 25 so I will have output in Newtons.
    Thank you for your help,
    John

    I am fairly new to Labview, so excuse my lack of knowledge at the moment.
    I didn't use a custom scale. Can you inform me of what to do?
    I multiplied voltage by 20 to correspond it to mm then by k (25) to convert it to a force,  is this correct?
    I reversed the ground and 5V supply on the 6009 so it will be reading 0 when pot is fully extended?
    Below is DAQ Assistant and Block diagram/front panel.
    Also my read from measurement file graph is only generating a somewhat straight line instead of an actual waveform??

Maybe you are looking for