Help interfacing a DC bicycle generator with my vi

Hello
I have a bicycle/DC generator displ;ay setup for the public to view here at the university. I have a vi that will count revolutions, keep time and calculate distance in meters. I used a bike computer. I cutoff the puter, juice up the pick up and when the magnet on the spoke goes by the voltage drops from whatever it is to 0v. I have the vi counting revolutions, calculating distance (known circumference of tire) in meters and a timer set for 5 minutes. It is hard puching against the generator when on the bike so a user will only be on it for a few minutes. I had to add a delay to count just one revolution when the boolean goes from Hi to Lo. Without this delay, the count can run more than one tick.
The generator output is 0-12vdc. A user can pound out more volts, but I am not interested in that. I want to display calorie per watt, volts, distance, power etc....In the image below you can see the display table. The watts are displayed as 50W, 75W, 100W, 125W, 150W and 175W respectively as the volt trip the relays - and the lightbulb goes on. You can also see an op amp circuit. This is to shape the DC generator output from 0-12v to 0-10v for Labview (the generator output is negative from my 2nd stage inverting amp to the DAQ card). My signal conditioning of the DC generator output is perfect. The display table is perfect. As can be
My problem is when I run the vi, nothing is displayed on the front panel gauge for DC volts out.
I am not very familiar with consumer/prodeucer programmimg. I really need someone to help me develop this. I would like to use what I have, but am not adverse to a complete change.
Anyone?
Thanking you all in advance,
NK
Another thing. I am using a battery supply for rail to rail volts for the op amps (w/virtual ground). See image.
Do I need to ground my DC generator signal in to the card. Chasis gnd? Or none at all? I am not sure about that.
Attachments:
Count_Digital_Events_RPM[1].vi ‏249 KB
DC Bike Genenrator_Labview Interface.jpg ‏123 KB
battery power schematic.jpg ‏29 KB

Your program is could effectively be refactored as a state machine.  It's not a bad overall effort, mind you, but you should do some research on state machines (start by searching this forum). 
Some general programming things (this is not everything I see, but I'm a bit pressed for time):
Your FOR loop does nothing.  It will either iterate once (in which case you don't need it) or zero times (in which case you REALLY don't need it).  And why are you ANDing your "start" button value with a T constant?  Just use the boolean value by itself.  Same thing.
You can eliminate your local variables and use a shift register instead.  (If you don't know about shift registers, that would be another terrific thing for you to learn.)  You do some odd things with that "revolutions" value -- why the local write variable?  just wire the final value straight to the indicator and get rid of the local write -- and some strange things with your "reset" button value.  You're converting the boolean to a number (1 or 0), then comparing it to a value of 1...in other words, you're checking to see if the value is T.  The boolean value itself already tells you that.  Just use the boolean by itself.
You don't need to invert your "cadence" value before inputting it to the "select" function.  Wire the boolean value in, and switch the numeric operations (so that the "+1" is input to the F terminal and the previous value is input to the T terminal).  Same thing as what you have, but cleaner.
I don't really understand your "time elapsed" loop within another loop.  Exactly what are you trying to accomplish with all that?  Is your elapsed time indicator supposed to be somehow related to your DAQ operation?  Right now it is not.
Now, your DAQ things:
You are using all of the default values for your physical analog channel, which means that the channel is configured for a range of -5V to 5V (which I'm pretty sure is not what you want) and the wire configuration is set to "default".  I don't know what board you're using, so I don't know what the default channel config for that board is, but you do need to make sure it matches your actual wiring.  Are you wired as differential?  Referenced single-ended?  You ask about whether you need to ground.  The DAQ board does need some kind of reference in order to measure a voltage.
Have you put a multimeter on your analog input terminals to see if you actually do have a voltage there?
Have you set a probe on the wire to your "generated volts" indicator to see what the DAQ board is measuring on that channel?
You are using "1Channel N Samples" but you don't configure a clock so you won't be grabbing N Samples.  Use "1Channel 1Sample" instead.
Currently your "set delay" is set to 15msec.  You don't need a loop iteration that fast.  Set it to 500msec or thereabouts.  You'll grab a DC value and update your front panel every 500msec, which should be more than often enough.  You're not measuring a rapidly-varying phenomenon.
Hope some of this points you in a direction.  As I said, this is not at all a bad effort.  It just needs some cleanup and a better architecture.  Everyone starts somewhere and you're doing fine.

Similar Messages

  • How interface N5181A MXG signal generator with labview by using LAN Interface????????????

    hai every one ...i have a doubt how  to interface N5181A MXG signal Generator with Labview by using LAN Interface???? and
    how to find IP Address of N5181A MXG signal Generator????????
    when i connect instrument with labview it shows that no instrument connected and what are the requirements for LAN interfacing with that instruments in labview and please help me?????? 

    You can set the IP Address on the instrument.  You may need to be in the same subnet of your controlling computer, so you may need to set your computer's IP Address to something static.
    Use VISA.  It makes life easier if you decide to use another bus (like GPIB, USB, serial, etc).  In MAX, create a network session with the static IP address you set the instrument to and use that as the VISA Resource.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Please help me , how idoc is generated with the transaction pu12?

    Hi
    please help me on pu12, how the idoc is generated.

    Please be aware that you are not communicating with Apple when you post in these forums. The only people who will reply to your posts are your fellow users.
    You will have to work with the authorized service centers in India. Why did the service center you contacted say that they could not help you?
    Regards.

  • SD reports we generated with the the help of ABAPers

    What are the SD reports we generated with the the help of ABAPers? How can we modify existing reports?

    Hi Gopala.,
                  Customer uses standard SAP reports if he wants additional reports apart from the functionality provided we functional people give the specifiction to the technical peole ABAPERS reagrding the report we needed and the tables and fields of the particular repot,With the help of that ABAPERS develop Query reports or they create reports
    Some reports we also can generate using LIS
    REWARD if helpfull
    Thanks & Regards
    Narayana
    Message was edited by:
            manam narayana

  • Lightroom 5.6 does not recognize nef (RAW) image files generated with the new Nikon D750: who can help here or knows what to do? Thanks, Peter

    New Nikon D750:
    Lightroom 5.6 does not recognize nef (RAW) image files generated with the new Nikon D750: who can help here or knows what to do? Thanks, Peter

    LR 5.6 doesn't support the new Nikon D750. You have to wait to the next update.
    You con also install the release candidate of the DNG converter and convert your NEF files to dng.
    http://blogs.adobe.com/lightroomjournal/2014/10/1366.html
    Axel

  • Add cookie with a client generated with clientgen

    Hi, I'm trying to add a cookie in my webservice client (generated with clientgen) when I call a weblogic webservice (generated with servicegen).
    But I don't find any methods to perform that.
    The Handler interfaces give me access to the soap headers but the not to the HTTP headers : so it's not rigth method.
    I tried too to add a property via the setProperty method on the Stub but I've an exception if I use something different of the four properties (user, password, sessionmaintain or endpoint_address) and there is no property for cookie...
    How can I do that ??!!!

    Thank you for the help Himanshu. There are three directors in different parts of the country that I need to share this folio with so I think the adobe ID will be the only way.
    Regards
    Gavin
    Sent from my iPhone

  • Help desiging a 10g Oracle Report with Matrix and Lexical Parameters - Long

    Hello all:
    I apologize in advance for this long post.... I'm using Oracle Reports 10g (9.0.4.0.33). First -- the question:
    I need to create a Matrix where the rows come from one database table
    (TABLE1) and the columns and cell contents come from a linked query (pulled from TABLE2) that is generated with lexical parameters based on the current TABLE1 row. The lexical parameters contain a WHERE clause for the TABLE2 query. Basically, I have a linked query between TABLE1 and TABLE2. I need to generate a Matrix around it.
    Does anyone know if this is even possible?
    Here's the background on the application, if that is helpful...
    I have an application where I maintain database tables containing names/addresses along with information pertaining to them. As part of the processing, I need to produce reports that contain statistics based on values in the table. For example, each row has a field RTYPE that identifies the Record Type (1-Suppress, 2-Buyer, 3-Inquirer). Each row also has a last purchase date field. The statistics produced for this field would look like this:
              2001     2002     2003     11/03     12/03 01/04     02/04 03/04     04/04     05/04 ...
    Buyer      100 150 250 30 25 15 8 9 22 83
    Inquirer     1000 800 493 ...
    Suppress ... ...
    Totals ... ...
    Each cell contains the count of the number of records that have the corresponding RTYPE and Last Purchase date. The dates across the top are determined by the most recent purchase date in the file. We count the last 12 months, month by month, and then anything older than that is grouped by
    year of purchase. So, the column headings are variable.
    The SQL query for this example looks like this:
    SELECT CASE WHEN rtype = '2' THEN 'Buyers'
    WHEN rtype = '3' THEN 'Inquirers'
    WHEN rtype = '1' THEN 'Suppress'
    END HLDESC,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END YYMM_8,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'MM/YY')
    ELSE TO_CHAR(T.HOTLINE, 'YYYY')
    END FmtDate_8,
    COUNT(*) HLCOUNT
    FROM &TABLENAME T
    GROUP BY CASE WHEN rtype = '2' THEN 'Buyers'
    WHEN rtype = '3' THEN 'Inquirers'
    WHEN rtype = '1' THEN 'Suppress'
    END,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'MM/YY')
    ELSE TO_CHAR(T.HOTLINE, 'YYYY')
    END
    ORDER BY CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END
    There might be a better way to write this, but that isn't the issue at the moment.
    I have many different tables, each with different fields. I need to produce counts on each of those fields. Some of those fields have a limited number of values where I need to count the occurrences and attach a description (like the RTYPE counts above). Others, like Last Purchase Amount, require counts within ranges (between 0 and 9.99, 10 and 19.99, etc.). Still others are "multiple choice"-style fields (such as products purchased), where we have multiple single-char flags that are not null when the corresponding products are purchased. In this case, we need to produce statistics that look like this:
              2001     2002     2003     11/03     12/03 01/04     02/04 03/04     04/04     05/04 ...
    Product 1 .........
    Product 2 .........
    The worst of the bunch is a field where I need to count the occurrence of each value within it (hundreds of values) without entering descriptions, so I don't know how many rows will appear ahead of time. This is used for "source codes" that identify where the name/address came from. They look similar to the RTYPE above, but the leftmost column contains each value from the field rather than a description. There are so many possible values and they change so often that it isn't feasible to enter a description for each one.
    Right now, I manually create an Oracle Report for each table when I design/load it. This is becoming difficult to manage, since I have over 150 of them now. Each of these reports can have any number of matrices to display (the largest right now has about 25).
    The new table structure to generate these reports consists of two tables: A COUNTHDR table and a COUNTROW table. The COUNTHDR table represents a single Matrix within the report. It contains info such as a heading for the Matrix and whether column totals should be calculated or not. The COUNTROW table contains a description for each row and an SQL Fragment that contains an appropriate WHERE clause to match the description. In the event of a "source code" style count, COUNTHDR has the name of the field to count. COUNTROWs won't exist, so I'll be handling those counts differently. But, ignoring that issue for now, the report structure looks like this:
    + Q1 +
    |
    + COUNTHDR +
    |
    + COUNTROW +
    | linked query
    + Q2 +
    |
    + COUNTDTL +
    Q2 is the query with lexical parameters for the table and "where clause" that identifies the actual statistic I need counted. I need fields from COUNTROW and COUNTDTL to form a Matrix.
    Can this be done? How?
    Of course, if anyone out there has a better idea on how to achieve my goal of not writing a report per table, please let me know!! :-)
    TIA
    Eric Raskin
    PS. This structure does not exactly duplicate my original query, since multiple Matrix rows are created by the single SQL query given in the example. Instead, I'll end up executing an SQL query for each row, which is less than desirable. The design will need some tweaking...
    PPS. I have tried handling this problem by pre-counting the target table and storing the results in a COUNTCOL table, containing the details of the matrix. This actually does work, but the performance is terrible. I have one "source code"-style count that generated over 20,000 detail cells, including all the "0" cells needed to fill out the matrix. If you don't generate the "0" cells, you get holes in the matrix presentation and/or error messages (which I can explain if you wish). I never did get Oracle Reports to print this one -- I gave up after an hour of runtime on a P4 3GHz machine connected via Gigabit Ethernet to the server. Hence the attempt to push the SQL Queries back into the Oracle Report itself.
    Eric H. Raskin Voice: 914-765-0500
    Professional Advertising Systems Inc. Fax: 914-765-0503
    200 Business Park Dr Suite 107 [email protected]
    Armonk, NY 10504

    Hi there
    here's example of my code
    Html header of the page :
    <script language="JavaScript" type="text/javascript">
    function callMyPopup (formItem1,formItem2) {
    var formVal1 = document.getElementById(formItem1).value;
    var formVal2 = document.getElementById(formItem2).value;
    var url;
    url = 'f?p=&APP_ID.:8:&APP_SESSION.::::P8_PROJECT,P8_PDRL_NO:' + formVal1 + ',' + formVal2;
    w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    </script>
    troubleshooting
    1.Test each parameter separate first - each work ?
    2.Use code above, rerig it, create multiple parameter
    3.try again...
    hope this helps...
    check your orginial source (page where items are) - what data

  • Conversion program generated with errors

    in lsmw idoc method at the step 11 convert data iam getting error as conversion program generated with errors can some body help me .i assigned port ,partnertype and partner number and activated inbound processing but still getting this error.somebody pls help me its urgent.

    Hi Mamidi,
    Go to the LSMW you have choosen and if it is Recording Method you are getting this error.
    Select Goto-->Recordings.
    Select the Recording you have choosen in the Edit Mode.
    Click on the Defaults All Button and save the recording.
    Now go to the option Convert Data and check .
    You will receive a message ..Conversion program successfully generated.
    Thanks,
    Sri

  • Exception obtained when invoking a web service generated with JDeveloper

    Hello,
    I tried to create a synchronous BPEL process that invokes synchronously a Java Web Service created with the JDeveloper. The web service is wrapped around a regular Java class. The new created BPEL process is successfully compiled and deployed on the server. But when I try to initiate a test instance of the process in the BPEL console, after I fill the input parameter for then process and push the "Post XML Message" button, I obtain the following error:
    Your test request generated the following exception/fault:
    BPEL Fault: {http://oracle.com/cde/util/Top300DAO.wsdl}org.apache.wsif.soap.fault{org.apache.wsif.soap.fault.object=java.net.ConnectException: Connection refused: connect}
    I looked at flow and it throws the exception when it tries to invokes the web service generated with JDeveloper.
    Do you have any hints, ideas? Thanks a lot in advance for your help.
    I want to also say that the proxy settings for the BPEL server and designer are filled. I think that they are ok because I succeeded to start an instance of another process that calls synchronously an external Web Service.
    Regards,
    Marinel

    My guess is that this is caused by the WSDL of your service having an invalid service address. Can you please take a look at the WSDL of your service make sure that the location of the address is valid? (we have seen a couple of instances in the past where the generated url did not have the right port information).
    Update that WSDL, restart the BPEL server or from the BPEL console clear the WSDL cache and re-initiate your flow.
    Best,
    Edwin

  • TOC Does Not Open in WebHelp Generated with RoboHelp 11

    The TOC does not open in WebHelp Generated with RoboHelp 11. I tried other solutions posted on this forum but no success. Any ideas? Thanks in advance for your assistance.

    Hi Jeff,
    Thanks for responding! I uninstalled and reinstalled RoboHelp 11 and the WeHelp appears to display OK now. BUT, I have graphics in my project that are not displaying, only the empty placeholder for the graphics. This was displaying fine in WebHelp generated with RoboHelp 9 but not now. I see the graphics when I do “Preview Topic” but not in the generated WebHelp. Any clues what is causing this behavior? How can I correct it?
    My tables appear very strange too. They are the default table in RoboHelp with the raised gray/silver border. However, in WebHelp, the tables appear as double solid black lines for the border. The tables appear fine in the topic but when viewed via “Preview Topic” and WebHelp output, they are double black likes. Help!
    Another thing is that I also get an occasional message about a topic that says “The reference to the file  contains illegal characters and will not be shown in Project Manager. How can this be? My css is valid and I use it in numerous help projects.
    Once again, thanks so much for your willingness to help. It is much appreciated.

  • Created a pdf file showing a graph generated with CL_GUI_CHART_ENGINE

    Hi Experts!
    Please, anyone has already created a pdf file showing a graph generated with CL_GUI_CHART_ENGINE??
    Could anyone help me with this requirement?
    Thanks in advance,
    Best regards

    Hi,
    I searched and found another solution, because with the code from the link above I got everytime a short dump, maybe I did something wrong.
    The solution works with Adobe Form
    1. I used the class cl_igs_chart_engine to create a chart with my data and customizing to get the binary data of the image.
    2. Convert the binary tab to xstring.
    3. You can use this xstring on the Adobe Form to display the image.
    Maybe the following tips are useful.
    *How to get the data of chart you can see in the class
    CL_TIME_CHART_SIMPLE (use cl_gui_chart_engine for the chart but  class cl_igs_chart_engine for saving the image)
    *How to bind the image to the importing parameter (xstring)
    /people/thomas.jung3/blog/2005/07/13/lessons-learned-from-adobe-forms-development
    Regards

  • User Interface In Table Maintenance Generator

    Hi Friends,
    Anyone pls Help me in this Concept ..
    What is the Purpose of User Interface In Table Maintenance Generator . When we will go for these User Interfaces and How to create these User interfaces.
    Thanks ,
    Laxmi

    Hi Simta,
    thank you for your reply.
    pls can you say clearly in what purpose we are going to customize the Interface and how to write code and where we have to write the code for interface.
    thanks,
    laxmi

  • Multitone generator with more inputs and with output to computer speakers

    I want to add several (perhaps 10)  harmonically related sinewave tones and output to the computer speakers or line out. Ideally would like to use the full audio range so 44100 Hz sample rate. I've managed to combine a couple of VIs and get something that works at lower sample rates but doesn't dynamically update if I change frequency or phases. And at higher sample rates it isn't a continuous sound. It just beeps, then waits, beeps then waits. I'm sure oters have tried to tackle this in the past but don't find much info. Currently using a Mac but could switch to a pc if needed. Guidance will be most graciously accepted.
    Solved!
    Go to Solution.
    Attachments:
    Dans Multitone Generator with amplitude and phase.vi ‏59 KB

    I found several things which together keep your VI from working the way you want. The VI attached works fine on my Mac.
    1. I configured the sound and the tone generator to use the same sampling info. Any other combination creates complications.
    2. I found out the hard way that the tone generator wants the frequncy to be an integer multiple of (sampling rate)/(# samples). This does not appear in the documentation (help file) but other combinations throw errors.
    3. Set the amplitude input (not Tone Amplitudes) on the Multitone Generator.vi to 1.00. This makes its output compatible with the Sound VIs. This is documented in the help but you have to read several places and put thepieces together.
    4. The reset input to Multitone Generator.vi must be true for it to respond to changes in the tone frequencies, amplitudes, or phases inputs. I just wired a true constant for now. Later this might be better handled by an event structure.
    5. Consider making the frequency, amplitude, and phase controls into arrays or one 2D array so that an arbitrary number of tones cna be used without modifying the program.
    6. Some kind of Wait may be required. Without it I occasionally received a Timeout error. Several options are in different cases of the Diagram Disable Structure. The Sound Output Wait will guarantee that the timeout does not occur but it also produces small gaps in the sound. The Wait (ms) works fairly well but it is a guess as to the optimum value for the Wait.  After all the changes I have madevene the no wait case seems to work.
    Lynn
    Attachments:
    Dans Multitone Generator with amplitude and phase.2.vi ‏38 KB

  • Applet generated with developper server 6i

    how can i resize the applet generated with forms 6i when deploying an fmx on the web

    Hi
    Go to your BASE HTML file, which is launching your WEB BASED form.
    In that file look for the width & height dimensions tags specified for your applet change them to your need and save the file, before launching the FORM again.
    Hope this will help.
    Mohammed R.Qurashi
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by touacha([email protected]):
    how can i resize the applet generated with forms 6i when deploying an fmx on the web<HR></BLOCKQUOTE>
    null

  • How to interface the Weigh Bridge System with ABAP thru' RS232 PORT

    Hi Gurus,
    Can any one guide me how to interface the Weigh Bridge System with ABAP thru' RS232 PORT. I think we have to use the BAPI. What is the name of the BAPI.
    I have to capture the GROSS WEIGHT, TARE WEIGHT. can any one give me the code for that.
    Goodwill
    Jacob charles

    Hi Jacob,
    <b>You can integrate Weigh Bridge with SAP ABAP .
    I have done this for one of our projects
    The technology used in RFC SDK and DCOM Connector.
    Refer to this link
    SAP Business One SDK Version 2005 [original link is broken]
    Search here for sap software distribution center link
    https://websmp203.sap-ag.de/~form/handler?_APP=00200682500000001943&_EVENT=SEARCH&HIDE=&SEARCH_SPAT=X&SEARCH_BPAT=X&SEARCH_CD=X&SEARCH_P=X&SEARCH_PV=X&SEARCH_C=X&SEARCH_CV=X&SEARCH_TA=&SEARCH_V=&HIDE_EXPERT_SEARCH=X&SEARCH_MAX_RESULT=20
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndcom/html/sapintegration.asp
    http://www.intelligententerprise.com/channels/applications/feature/archive/homann.jhtml;jsessionid=BR44S4YLZ0HSGQSNDLOSKHSCJUNN2JVN?_requestid=505707
    www.sapgenie.com/sapgenie/docs/SAP%20Connectors.doc
    help.sap.com/printdocu/core/ Print46c/en/data/pdf/BCMIDDCOM/BCMIDDCOM.pdf</b>
    Good Luck and thanks
    AK

Maybe you are looking for

  • WebCenter WorkFlow

    Version: WebCenter Spaces 11g PS3 WebCenter provides some inbuilt workflows on content. Is it mandatory to use Oracle Content Server as a connected repository to avail the built-in workflows. If we want to use Sharepoint then what needs to be done fo

  • Can´t add a roll or function

    Hi, I installed a server 2012 Essentials and it worked well, but when I try to add a roll or function it says ca´t show the functions that are avalibel on the server. Coulden´t open a DISM-session. Error 0x80070032. What to do??

  • Need design hints for Managed class

    I need help understanding the underlying LCDS mechanisms when a complex object hierarchy is managed in LCDS.  I have a custom Assembler because I have specialized persistence requirements.  My object hierarchy is basically the following: Document    

  • Creating DOWNLOAD button in dreamweaver

    Hi there, I'm trying to create a DOWNLOAD button in dreamweaver so the viewer can download the Quicktime video onto their own desktop to keep, in addition to simply viewing it off my site. How would I do that? I tried googling it, but no luck. thanks

  • Toggling visibility of parts of a dialog UI

    I want to show and hide parts of my ui when certain events are triggered. My problem using the visibility property is that elements still take up space after they've been made invisible. What's the easiest way to go on about this?