Frequency sweep with vb6 and measurement studio

hello! i hope you can help me with my problem
im using:
-PCI-MIO-16E-4 Daq-Card (at the moment, later i will get the PCI-6115 Daq-Card)
-Visual Basic 6.0 with Measurement Studio
my Problem: i want to stimulate a mechanical system with sine-waveforms of differernt frequencies, because i want to measure the resonance frequency of the mechanical system.  For that i want the Daq-Card to output a sine waveform, the frequency should be swept from one frequency to an other frequency (i think the real values dont matter at the moment). The Problem is that the sine-waveform must not be interrupted  when you change the frequency, because this would disturb the movement of the mechanical system.
I allready tried (without Measurement Studio) to use the fifo buffer (regeneration of thewaveform in the fifo) to be independent of the delays caused by the pc-system, but when i change the updaterate (change of the frequency) of the DAC there is again a dependence on the pc-system and the waveform goes to zero Volts for a while.
And i also tried to use the Chirp-Function (CWDSP.Chirp) of the measurement Studio, but with this function i have the problem, that i cant define how long the DAQ-Card outputs the actual frequency.
greetings A.Herman

Hello SG_ENGINEER,
So that is possible, but it is a completely different approach than that mentioned above.  You would have to use a continuous analog output program and change the output waveform.  Check out the attached example.  I modified a shipping example to do an analog output and increment the frequency of the output waveform. 
-Alan A.
Attachments:
Continuous_Analog_Out_Update_Sinewave.vi ‏100 KB

Similar Messages

  • How to measure current and resistance if i only have DAQ using VB 6 and Measurement Studio

    I want to do a remote lab for basic electronic lab. One of the task is to measure current and resistance. How to do it if I only have DAQ card and using Visual Basic 6 and Measurement Studio. Can anyone give me a clue.

    If your DAQ device is supported by DAQmx, you can use it with VB6. Here's how: NI-DAQmx Support in Visual Basic 6.0.
    Michael P
    National Instruments

  • Frequency sweep with peak frequency

    Hi guys, I need some help here. I´m using a NI 9215 to do a frequency sweep from 30 to 90 Hz.
    So far so good. Now I need a resulting resonance frequency at highest voltage.
    I tried a max peak frequency VI but couldn´t get it to work.
    Any idea what to do?
    mfg, Andi
    ok, here is my sweep.vi for better understanding
    Message Edited by andinew on 08-11-2009 04:14 AM
    Attachments:
    sweep.vi ‏216 KB
    create_log_frequencies.vi ‏15 KB

    Hi Andi,
    one thought first off: looking at your "create_log_frequencies.vi", I realized that it generates linear frequency hops, not logarithmic ones...
    But on to your question: to find the frequency with the highest amplitude (this will be your resonace, I guess), you will have to look at the entire signal - your "sweep.vi" code iterates the measurement and interpretation five times per second, independantly of the speed of the sine sweep.
    My advice would be to generate one waveform containing the whole sweep run, and writing this sweep block for block with a constant sample rate onto the output. You could then read back the response with blocks of the same size as your output, do the single tone measurement on this block and store the resulting frequency and amplitude in an array preserved trough a shift register or simply into two auto-indexing tunnels. The latter is okay as you don't need a "while loop" in the measurement loop (you know how long the analog output loop runs - why not use this information to configure a "for loop").
    After your analog input "for loop" has finished, search your amplitude array for the maximum - then use the found element's index to index the frequencies array and return the corresponding resonance frequency.
    A good starting point could be the example I wrote a couple of month ago: it runs continuously the same "sweep" (you'd have to adjust the waveform, I know) and reads back the stimulus and the response (wire the output to your probe and parallely to ai0, your response signal will be connected to ai1). You can then insert tone measurements etc.  at the marked section...
    When trying to open the example, you will be prompted to find a VI called "_Get Terminal Name....vi" - you can find this VI at the following location: C:\Programme\National Instruments\LabVIEW 8.5\examples\DAQmx\_Utility\_Utility.llb
    As an afterthought: the "phase difference" you are calculating between every other sample of the analog measurement array is a bit confusing: if oyu need the phase difference between the original signal and the stimulus response, you will need to wire the stimulus to a second input and compare the phases of the two separate signals...
    Best regards,
    Sebastian
    Message Edited by SFK on 08-12-2009 04:12 PM
    Attachments:
    Multi-Function-Synch AI-AO mit Signalgeneration.vi ‏91 KB

  • How do I perform an FFT or ReFFT in VB6 using measurement studio

    I am trying to make a filter by taking a 1D array of voltages and doing a ReFFT() and padding the high frequencies in the array with a value of zero and then going back to time domain with ReInvFFT().  Here is my code which does not seem to be filtering any high frequency content.
    lngReturn = frmMain.CWAI1.AcquireData(varData, varBinaryCodes)
    frmMain.CWDSP1.ReFFT varData, realdata, imgdata
    For i = (UBound(realdata) / 100) To UBound(realdata)
        realdata(i) = 0
        imgdata(i) = 0
    Next
    frmMain.CWDSP1.ReInvFFT realdata, imgdata, varData
    After the function is done varData has a 1D array of filtered real voltage values.  It does not seem to be filtering and I get back exactly what I pass in.  I know it must be something simple that I am missing perhaps the variable cannot be used to pass in and then  back out the values??
    Please shed some light as there are NO examples of this use of FFT.
    Thanks

    Arthur,
    Thank you for your reply.  But at this point, one of my points of confusion is what software I have available to me.  I wish I had a useful central help desk to call up and just say, "Hey, load me up with all of the professional version(s) of Visual
    Studio.  But I do not know what we have license to.  And I kind of need to know what the options are, so that I can ask a specific question of our vast buracracy.
    For now, I have downloaded only free versions of Visual Studio client software.  Since my company does have servers running Microsoft SQL Server, I am going to assume that we have proper licensing for those servers.  But does that server license
    allow me to get any professional versions of the PC client software for the various Visual Studio(s) 2012?
    And if I get a professional version of Visual Studio 2012, does that do away with the three different flavors that I have right now?  I have 2012 versions of SQL Server Management Studio, Visual Studio Express, and Visual Studio Shell (Integrated).
    Your feedback is much appreciated.
    Thanks!

  • When using the LabVIEW Simulation Module, how can I start a frequency sweep with the Simulation Chirp signal generation VI at an arbitrary time after the simulation initial time?

    I'm using the Simulation Loop on LV RT when interacting with some hardware (i.e. all I/O is happening in the Sim loop). I'm going to conduct a frequency sweep test on the hardware and want to use the Simulation Chirp function. However, there is no way (that I can see) to trigger the Chirp to start at some event (i.e. I click a boolean on the front panel and enter a case statement). The Chirp is tied to the global time of the Simulation loop and so are it's input parameters. Is there a way to make it relative to some time at which an event happens?

    Craig,
    Your solution will 'cut' the beginning of the signal and only show the signal afterwards.
    To control when the chirp should start, the best option is to use the Chirp Pattern.vi ( in the Signal Generation palette) and use a Lookup table to control when to feed the time. The shipping example (in LabVIEW 2013) shows how to code using a lookup table.
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Signal Generation\SimEx Chirp.vi
    Then, to start from a toggled boolean, look at the example:
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Signal Generation\SimEx Step.vi
    and Here is the example in 2013 (in attachment):
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments
    Attachments:
    SimEx Chirp with Delay.vi ‏241 KB

  • How to switch central frequency fastly with labview and USRP?

    Hello everybody,
             Recently I was making a frequency hopping receiver with labview and USRP N210 and SBX. The transmitter works on the 2.4G band, and it changes from one central frequency to another every 65536us. As I think, if I start receiving at the correct time, and  change the central frequency of the USRP every 65536us, I should be able to receive the data.
        But I find that, when usrp switch form one central frequency to a different one, it spends nearly 48ms and when it switch from one frequency to the same one, it only spends 3ms(I test the performance by modifying the niUSRP EX Rx Continuous Async Reconfig on the Fly.vi example). So if I want to follow the hopping sequency, I may can only receive 17ms data because I have to save time for switching central frequency. 
         My problem is that: why usrp changes central frequency so slow,  how can I make the process faster? If I want to follow the hopping sequency, can anybody give me some good advice? Thanks

    There is an attribute "LO Frequency" that you can use to lock down the frequency of the local oscillator.  Then, when you set the "Carrier Frequency" attribute, the difference between the carrier frequency value and the LO frequency value will be realized by frequency shift in the DSP in the FPGA.  Changing this "digital" frequency shift value is much faster, since you don't have to re-tune the local oscillator.
    Let's say you're sweeping from 2.44 GHz to 2.46 GHz.  Set the "LO Frequency" to 2.45 GHz then Commit.  Then, in your loop, program the "Carrier Frequency" attribute from 2.44 GHz to 2.46 GHz.  In the loop, it will only program the digital frequency shift, which will happen much faster.
    Another tip is to use the property node to program only the attributes you want to change, rather than the niUSRP Configure Signal.vi (which sets many at once).
    For more details, see the "Configuration:Advanced:LO Frequency Property" in the NI-USRP Help, and look at this example:
    <LabVIEW dir>\examples\instr\niUSRP\niUSRP EX Fine-Tune LO Frequency.vi

  • Conflict between ActiveX from LabVIEW and Measurement Studio?

    Hello
    We're small software company from Poland. We're developing our product
    (SCADA/HMI and integration system heavily based upon Measurement Studio
    graphic controls) in C++ for Win32 environment (MSVC 2003 Edition C++
    Compiler). Today we ran into serious problem: our client, one of the
    biggest Polish companies that sell automation software and hardware, is
    evaluating our product. Company staff members are using LabVIEW, too
    and have various version of LabVIEW installed on their PCs. It turned
    out that our program displays message that license is needed for
    Measurement Studio ActiveX controls, and crashes, when ran on PC with
    LabVIEW installed! (This one has LabVIEW 6.1, 7.0, 7.1 simultaneously
    installed).
    While I gues that crash is not Measurement Studio's fault (I guess that
    control fails to create and throws exception which is not catched by
    our code...we'll fix that) I'm pretty sure that this "license" stuff
    is. Of course we have legal version of Measurement Studio 7.1, and all
    controls used in our software have their respective licenses generated
    and compiled into application (we create all controls dynamically). We
    have never run into such problem before, and we're using Measurement
    Studio for years...please help.
    Some additional details: control that failed is CWBoolean in "3D Diode"
    configuration. Other controls, including CWBoolean in another
    configurations seem to work OK, at least I was told so (it's pity that
    I don't have faulty configuratio here...will try to reproduce it using
    some kind of LabVIEW evaluation version).
    Best regards from Poland, and thanks for any help.
    Michal
    Michal Adamczak
    Lead programmer, ANT ISS (http://www.ant-iss.com)

    Hi Michal,
    This is actually an error message that is usually fixed pretty simply by using our License Fixer.  Sometimes the licenses for the ActiveX controls can become broken in Measurement Studio.  This usually happens if you install drivers after installing Measurement Studio or a program created using Measurement Studio.  You can find the License Fixer here.  Try this out and let us know if you still have any trouble.
    Thanks,
    Caroline Tipton
    Data Management Product Manager
    National Instruments

  • Release management with Azure and Visual Studio Online (Cloud TFS)

    What strategy would you use to manage the releasing of versioned software to Azure cloud services (web and worker roles)? We are not looking for continuous integration. We are using Visual Studio 2013 and Visual Studio Online (Cloud TFS).
    At one point, we were releasing straight from Visual Studio using the Azure Cloud Project Publish tool. This is really bad practice in my opinion as you can never be sure what you are really releasing. Additionally, there is no automated control on the labeling
    or branching of code, or the running of unit tests and code analysis checks.
    Next, we employed Release builds on Visual Studio Online. Before deployment, one would edit the appropriate Build Definition (whether it be for Test or Production by and filling in the code label (under the "Get Version" build property) that is to
    be released. This would then get the appropriate code (by the label specified), build it, and release it to whatever cloud service is specified in the targeted Cloud Project profile (this is using the AzureContinuousDeployment.11.xaml template).
    There is still a degree of manual intervention involved. Also, the fact that a version of code is built every time before it is released is not ideal (as far as I understand it would be better if it was packaged once).
    Microsoft Release Management tools
    look ideal for the job, but are not supported with Visual Studio Online.
    Is there a better way of handling our releases?

    /waves hand.. These are not the tools you seek. You are looking for continuous integration.
    Although CI has the word continuous in there, it does not mean "all the time, every checkin". It can easily refer only to those bits you want to release - -and the way to tell the system which bits you want released is to merge them to a Releases
    branch.
    If you do this, not only do you get all the joy of controlled CI, but you guarantee what you release is exactly what is controlled in your SCM - under the Releases branch, preferably tagged or otherwise noted as a particular release. That means you can also
    rollback to a previous release by simply reverting to a previous release in your SCM!
    Of course you don't have to let it happen automatically, you can set it up to build 'continually' and then remove the check on the SCM to see if any changes have been committed. You can replace this with the manual build button.

  • Can I avoid re-encoding of .mov files with Compressor and DVD Studio Pro?

    Hello,
    I've had some projects banned at one of the tracking sites because my iMovie 6.0.1/iDVD 7.1.1 workflow involves re-encoding of the iMovie .mov file to MPEG 2 when authored in iDVD. I did some research, and was advised that I could get around the re-encoding by using Compressor and DVD Studio Pro instead of iDVD. But, when I import the iMovie file to Compressor for authoring in DVD Studio Pro, the result is another MPEG 2 file. So, am I missing something, or is there no way for me to avoid re-encoding with Apple video production tools.
    Thanks for any assistance.

    The simple fact that you have to encode your files into an mpeg-2 stream means that you're going to experience a loss in quality.  Check the bitrate of your DV files.  The max bitrate for all of the elementary steams (audio, video) on a DVD is 9.8mbps.  So if your source has a higher bitrate than that... you're going to experience "lossiness."
    However there are some tricks that I've read about that increase the overall quality of compression... and yes they are for windows.  Check out AVIsynth and MeGUI... there is a learning curve to learning these tools though.  I never followed through with it.
    EDIT: Also forgot to mention that learning these things takes TIME.  Quality encoding takes much longer than realtime. 
    You can also check out some higher quality mpeg2 encoders like cinemacraft and HC encoder, although the former costs $$$.  The quality you get from these encoders are much better than what you have in iDVD and DVDSP/Compressor.

  • Developing Enterprise Apps with Weblogic and WebGain-Studio

    Hi everybody,
    Is anybody experienced in developing with Weblogic Server and WebGain-Studio
    What could be a good environment for working with these components ?
    Thanx,
    Markus.

    Thanks for your prompt reply. I have another question. I am very new to Java development.
    In our environment, WebLogic 10.3.6 and JDK1.7 are both 64-bit. However, developers' machine are 32-bit windows. They will have Weblogic server installed locally in their machines for development. Later, the codes will be deployed and run in the 64-bit environment.
    Thus, we are developing java program with 32-bit java and compile/run it with 64-bit java. Is it the right way to do it or do our developers need to use 64-bit windows?
    Edited by: nww on Sep 14, 2012 2:51 PM

  • Help with VB6 and Oracle Spatial

    Does anyone knows how to access to the Geoloc field of an oracle 8.16 table using VB6?
    I need to read/write it but Ado doesn't like very much that dataType...
    I'm triyng with ADO and oracle's oraOleDB, but i'll appreciate any other working solution.
    Thank You.
    Daniela.
    null

    We have written a stored procedure(Procedure) in Oracle to update the data type fields that are unavailable in ADO calling the procedure using ADO from VB.
    Dinghy, how much of a learning curve is it to go from ADO to OO4O (Oracle Object for OLE)?
    Thanks,
    Thomas L
    null

  • Creating BITC DVD with FCP and DVD Studio Pro

    Ok so here's my question:
    I've created a sequence with BITC, and now I want to export it to DVD studio pro so I can burn it to a dvd. I've been exporting as a quicktime movie, at DV PAL Anamorphic res. When I bring it into DVD Studio as an asset, it has to re-encode.
    Can I drop one of these steps - ie. how do I export from FCP so that the resulting file does not need to be re-encoded in DVD studio.
    I'm sure this is really very simple, but it's going to help me a lot - I have several (10-15) hours of footage to do this with. Thanks in advance...

    export the file as a QT not self-contained use current settings
    luanch Compressor, drag and drop the QT file on to the window then encode to get
    M2V video and AC3 sound file
    import those into DVDSP

  • Problem changing SQL data source at runtime with VB6 and CR XI

    Hello All,
    We have several VB6 programs using CR XI and are able to pass a DSN to change data source with Access DB that works just fine.
    We are using similar code in another program to change the data source in an SQL DB and get an error... Failed to Open the Connection.
    This is a sample of what works with Access but not SQL DB:
    Dim crxApplication As New CRAXDRT.Application
    Public Report As CRAXDRT.Report
    Global DSN_STRING
    DSN_STRING = "DSN = JC Crystal Reports"
    Dim crxDatabaseTable As CRAXDRT.DatabaseTable
    Set Report = crxApplication.OpenReport(App.Path & "\Test11.rpt", 1)
    'change location of each table in report
    For Each crxDatabaseTable In Report.Database.Tables
            crxDatabaseTable.Location = DSN_STRING
    Next crxDatabaseTable
    FormCrystal.Show vbModal
    We have tried other things from the web, still get error.
    Any help would be greatly appreciated.
    C Reid

    Hi Carole,
    When using SQL types you need more than just the DSN name. CR does keep the password in the report file and all SQL types are usually password protected.
    Try this simple code:
    First log onto the server:
    rpt.database.LogOnServerEx("crdb_odbc.dll, pServerName, [pDatabaseName], [pUserID], [pPassword], [pServerType], [pConnectionString])
    The ConnectionString is the complete line. Run in debug mode and display what the reprot is using and you can see the format it requires.
    Once logged on now you can set the location for each table:
    'report connection properties
            With rpt.Database.Tables(1)
                .ConnectionProperties("User ID").Value = "sa"
                .ConnectionProperties("Password").Value = "YourPassword"
                .ConnectionProperties("Data Source Name").Value = "Your DSN Name"
                '.ConnectionProperties("Data Source Name").Value = "ServerName" ' can be used if specifying a new connection
                .ConnectionProperties("Database").Value = "Northwind"
            End With
            Set rpt.Database.Tables(1).Location = "Northwind.dbo.CustOrderHist"
    I'm only using one table so easy enough to create the loop or use for all...
    Thank you
    Don

  • SAP logon pad with NCo and visual studio 2003

    Hi All,
    I'm struggling to find a way in visual studio 2003 utilising the dot net connector to allow the user to select the SAP system, client user name and password in a similar way that happens when done with activeX controls.
    E.g. with ActiveX this sort of code:
    Dim sapConn As Object 'Declare connection object
    Set sapConn = CreateObject("SAP.Functions") 'Create ActiveX object
    If sapConn.Connection.Logon(0, False) <> True Then
    The false in the last line prevents a silent logon i.e. a little pop up window is created with the server, client etc. for the user to select and fill in.
    I have been trying to use methods like availabledestinations and getdestinationbyname as well as the destinationname property of the saplogon proxy I dropped on my form. In fact I can see all the destinations when I drop down on the destinationname property on the proxy logon object. I though of maybe binding this to a list box but I can't seem to get that to work.
    I also tried setting the SAPgui value to 0,1 or 2 on the proxy logon object but this had no effect.
    Is there not a simple way of doing this similar to the ActiveX approach?
    PS. This is a windows forms project and not a web project.
    Thanks,
    Grant.

    Hi Jitesh,
    Thanks for the quick response!
    I declared _e as an iDictionaryEnumerator, is that correct?
    So the code looks like this:
    Dim _e As IDictionaryEnumerator
            For Each _destEntry As System.Collections.DictionaryEntry In SapLogonDestination1.AvailableDestinations
                Dim _destText As String = _e.Value.ToString
                Dim _destKey As String = _e.Key.ToString
            Next
    I get a Nullreference error: Object reference not set to an instance of an object at the line Dim _destText As String = _e.Value.ToString.
    What have I done wrong?
    Thanks,
    Grant.

  • Working with CVS and Java Studio Creator 2

    Hello,
    I'm a new user of java studio creator and I would like to make a project using ths CVS.
    First, I've installed a CVS server on a computer.
    Then I've created a new project (an example included with JSC)
    Then I've customized the version manager in JSC 2 to connect to the remote CVS server.
    No problem, if I try to connect to CVS in the version manager, it work ("You are connected").
    On the other hand, when I want to check out my project on the CVS (the first check out), I've got this error :
    cvs server: connect to 82.252.252.173(82.252.252.173):2402 failed: Une tentative de connexion a �chou� car le parti connect� n'a pas r�pondu convenablement au-del� d'une certaine dur�e ou une connexion �tablie a �chou� car l'h�te de connexion n'a pas r�pondu.
    cvs [server aborted]: Couldn't connect to lock server
    Have you got an idea on the configuration error I've done (no solution found in the articles nor faq)?
    Thanks in advance
    Nicolas

    Hello,
    You can see checked out files when you use the Versioning Manager. Just expand the tree to see individual files and folders. It's always a good idea to do an update before you start editing a file in Studio Creator. The Merge Conflict Resolver is a a very useful tool when more than one developer is working on a file.
    You can find a lot more about version control in the IDE's help files.
    And by the way, your English is fine.
    --James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for