LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generation of inclined Sine wave

Hello Community,

 

I am a graduate student. I need to write a program in LabView for my project. We have a servo drive which is attached to rack and pinion. The aim is to move the sample attached to the rack and pinion.

 

It is required to move the sample with a specific sine wave. The movement is unique and combined with 2 types of motion. First one is the sample will oscillate with a fixed frequency with a perfect sine wave. Second one is the sample will move downward with a fixed velocity. I am trying to write a code so that the sample moves with superimposed motion of 45 deg sine wave. I have attached the required sine wave named as "superimposed sine wave".

 

I am using DAQ Express software from NI. I am using USB 6003 DAQ device for analog voltage input. The device has analog voltage restriction of 10volt peak to peak. My experiment will last only for 5 seconds. The draw wire sensor that will be attached to the sample to get the output has a sensitivity of 1.906mV/mm. The frequency of the size wave is 5 Hz. Amplitude is 6mm (3mm+- for up and down). Therefore, the amplitude signal should be (considering the draw wire sensor sensitivity factor) (3mm * 1.906mV = 5.718 mV or 0.005718 V). The second motion, velocity of the sample to the downward for 100mm per second. If I convert it to draw wire sensor sensitivity factor, it would be (100mm * 1.906mV = 190.6 mV or 0.1906V). After writing the code and test the code with an oscilloscope, I am having several problems as follows:

 

1. There is a time delay, after which the sine wave generates in the oscilloscope. How to make to zero time delay?

2. I tried to use "Ramp pattern by increment" function from signal processing and pattern generator menu. In order to make it consistent with the velocity, the appropriate voltage should be 0.1906V. However, I can not make it fraction. I have attached the error as the screen shot of pattern generator.

 

Is there any alternative way to write the code? I have attached the project code for your convenience. I would greatly appreciate if someone help me in this regard. 

 

Best Regards,

Muhammad

0 Kudos
Message 1 of 24
(1,537 Views)

Thank you for trying to send us your entire LabVIEW Project so we can examine your code.  However, your .zip file contained a single file, with the extension .lvproject, which is a file type that I didn't immediately recognize (I'm very familiar with .lvproj files, which are the "Project Files" that LabVIEW configures when you create a new Project and holds links to the VIs that comprise the Project).  There were no VIs or TypeDefs in the .zip file, just the single .lvproject file.

 

Do you have the LabVIEW code (VIs, TypeDefs, etc.) and a .lvproj file that you open when you want to create and modify and test VIs that are part of this Project?  If they all lie in a single "Project Folder", it is the compressed form of this "Project Folder" that would be useful for us to see in order to make intelligent suggestions.  

 

What version of LabVIEW are you using?  Not everyone is using the most recent versions ...

 

Bob Schor

Message 2 of 24
(1,518 Views)

Thanks a lot, .

 

I am actually using DAQ Express software, which runs in LabVIEW environment. 

Link: https://www.ni.com/en-us/shop/data-acquisition-and-control/application-software-for-data-acquisition-and-control-category/what-is-daqexpress.html 

 

When I write a code in the DAQ Express software, I can only save it in .gvi format. I have attached it. Can you open that? I have also attached screenshots of diagram and panel window of the code. 

 

Thanks.

 

Muhammad

 

 

Download All
0 Kudos
Message 3 of 24
(1,503 Views)

Oh, no, are you using LabVIEW NXG?  The "pictures" you attached certainly are not "classic" LabVIEW, which is still being supported by NI.  I did download and install a version of NXG a few years ago, but it was too "different" and "lacking in the things I needed and was using in LabVIEW" for me to continue trying to learn an "incompatible" programming-paradigm-in-development.

 

Sorry, I don't know how to help you -- it's almost like you sent me code in "Visual Python" ... (a made-up Graphic Language).

 

Bob Schor

Message 4 of 24
(1,500 Views)

Could you suggest me how to write a program for the desired operation in normal LABVIEW environment? Then I will certainly try that.

0 Kudos
Message 5 of 24
(1,497 Views)