LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to send arbitrary signal to Dc power supply. Help. Please.

Solved!
Go to solution
That is not the correct driver or example. It is NOT A the one you were told to download. Use the driver at http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=04709BEF46E04098E0440003BA7CCD...
Message 31 of 48
(2,000 Views)
Solution
Accepted by topic author jeet.saha3.js

Hello,

 

Looking into a bit deeper the Agilent driver, I really do not like what I see. Quite ugly work, whoever did it...

anyway, just an idea, but I have found that someone had similar problem in the past, the link is here:

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Error-1300-at-HP66xxA-Configure-vi-222-Overvo...

 

So could you try the following modification of my VI?:

 

Agilent_test_BD.png

 

Yes, I have a strong feeling about this causes the error...who gives out such a driver??? Shame...

 

Configure.VI :

 

Agilent 66XX Series.lvlib_Configure_BD.png

Message 32 of 48
(1,979 Views)

Up to this point, I had assumed the instrument drivers were something NI approved for placement on their site because the instrument was one commonly used with LabVIEW. Is this not the case? Does the supplier just throw the VI set over to NI, say "here you go", and NI hosts it? No verification?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 33 of 48
(1,945 Views)

Yep. If I have time, I will report this bug toward NI, so they can fix it.

Actually this is not the first time I encounter such problem. Never trust any "official" driver, even if you download from NI. As I remember back,

I had a strange bug with a Keithley 2400 sourcemeter. I used the sourcemeter in the 1 mA range, in this case the programmable step resolution is 50 nA. Ok, I made my test VI, and started a test. I just did not understand, even if I change the current control (double precision) with 50 nA, I do not get the same change at the KE2400 display 😄 OK... I have looked into the used VI, called "Configure Output.VI". You know what I have found? 😄

This!:

 

Keithley 24XX.lvlib_Configure Output_BD.png

Coercing the given double value into single precision! 😄 Haha, so with this "official driver", you cannot use the possible best step resolution which is 50 nA in 1 mA range...

This was a few years ago, as I remember I reported the problem, but have a look, the driver still contains the same bug:

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=25B255F3AA83660EE0440003BA7CCD...

 

Of course after realising this mistake, it is very easy to fix it:

 

Configure Output_K2400_doubleprecision_project_BD.png

 

So be guys always careful with any given driver, there can be many hidden bugs! 🙂

 

 

 

 

Message 34 of 48
(1,937 Views)

Respected Sir 

0 Kudos
Message 35 of 48
(1,886 Views)

Hello Blokk, 

I have done the modifications you've suggested and the error seems to have solved. 
Thus I can see the random number generation. Thanks! 
Now if you remember my actual aim, I need to send signal via Labview to output. Any suugestions ?  Have a look at my program and suggest! 

Thanks,. 

0 Kudos
Message 36 of 48
(1,883 Views)
You haven't understood anything. You converted the dynamic data to a 2D array instead of a 1D array and you haven't placed the instrument write function inside a for loop that you pass the array into. This is basic programming and you need to take several of the free tutorials to understand.
0 Kudos
Message 37 of 48
(1,873 Views)
Solution
Accepted by topic author jeet.saha3.js

@jeet.saha3.js wrote:

Hello Blokk, 

I have done the modifications you've suggested and the error seems to have solved. 
Thus I can see the random number generation. Thanks! 
Now if you remember my actual aim, I need to send signal via Labview to output. Any suugestions ?  Have a look at my program and suggest! 

Thanks,. 


First of all, you need to learn more about LabVIEW, start some tutorials, and online course if you have access.

Here I give you just an idea, it is up to you to do some more work. You want to send an arbitrary signal, ok. It is not totally arbitrary, since you have limitations in timing, lets say 100 msec is the smallest rate how  you can change the voltage level output for this PSU.

In this snippet I can show you how to feed a 2D array into a for loop which will set your DC PSU. the first column contains the timing info (required delays in msec), the second column contains the required voltages. This can be done also with an ASCII file: you read the content of the text file into a 2D array, and connect it to the FOR loop.

 

If you want to change the voltages with a constant rate, you only need a 1D array containing the voltages, and you set a constant, for example 100 msec to the "Wait (msec)" function inside the FOR loop.

I think I helped enough, now it is up to you what you develope...

 

Agilent_test_v2.png

Message 38 of 48
(1,828 Views)

Can anyone tell me what is wrong with the program as I am not being able to see the voltages correctly. The power supply should make it 4times(as it is having a gain of 4) or at least show the voltages similar to input. But the output goes to 1v and then comes down and settles around 0.378V everytime I run it.

There must be some problem with the communication with GPIB i guess. But I checked, and can't find any problem.

 Sir, I agree and heartily thank you for helping me throughout. I request to help me one last time. 

Hope I'm not disturbing. 

Thanks.

Download All
0 Kudos
Message 39 of 48
(1,778 Views)

As I see you just do not understand how this VI works, even if I gave a description to it:

 

"In this snippet I can show you how to feed a 2D array into a for loop which will set your DC PSU. the first column contains the timing info (required delays in msec), the second column contains the required voltages. "

 

What you show in the "Screenshot (7).png" screenshot, you try to feed relative time values in seconds (0.000, 1.066, 2.257, 3.400, ...). As I wrote above, my example VI works as it takes the first column of the 2D array, and creates the delays in the FOR loop in milliseconds!

So using my VI you cannot feed relative time values as they are. You should create the differences between the values, and convert them to milliseconds (multiply by 1000). You can do this even in Excel, and type in the values in msec, if you do not want to programm more...

 

Beside, the array values (also in your txt file) what you show in yoour screenshot has a problem! The 6th value is 4.488, but the previous one is 4.560 !!! The arrays values must be in ascending order to make sense if they are supposed to be relative time values, not???

 

Other thing to consider: do not create much lower time delay as 100 msec as I wrote earlier! Between the 5th and the 6th relative time values, the difference is smaller than 100 msec! It still should be ok, until it is larger than 50 msec (the limit by the manual), but I would not go below 100 msec still...

 

Also you must read the manual and consider the step resolution in voltages: it is one thing you send a voltage value to the device from LabVIEW, like 1.192 Volts. But since the voltage programming accuracy is 10 mVolts, the actual used part of the required voltage value will be only 1.19 Volts, and NOT 1.192 Volts!

 

 

 

Message 40 of 48
(1,753 Views)