Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

0-10v analouge output from 6024e?

hi,
I'm very new to measurement studios but i was wondering would anyone have any suggestions/ resources as to the coding required to set a 0 - 10v analouge output from a 6024e interface card to control a variable speed pump, need it to be controlled through vb by say a slider, num box etc and with real time constant changing.
any help at all would be appriciated greatly,
john.
0 Kudos
Message 1 of 10
(9,998 Views)
Hi John,

I have written some VB6 code to generate a single point analog output to a single AO channel.
However I have not been able to test this code with hardware. The code runs on a simulated DAQmx device.

Please can you tell me if this solves your issue.

Regards
JamesC
NIUK and Ireland

Message 2 of 10
(9,988 Views)
Hi John,

Attached is the final version of my code. I have made sure this works with an E-Series device and have also included some error fixes and made the clean-up code easier to understand and implement.

I also fixed an issue with the slider, and changed the code to allow you to stop the generation without closing the form.

Regards
JamesC
NIUK and Ireland

Message Edited by JamesC on 05-24-2007 09:33 AM

Message 3 of 10
(9,983 Views)

Hi james,

sorry i didn't get back onto you sooner, the code looks perfect but i'm having a little trouble running it. Got an error message saying nidaqmx.tlb could not be loaded when trying to load the VB project, continued and the slider function comes up as undefined when trying to run it, thank you for your help so far.

johnK 

0 Kudos
Message 4 of 10
(9,977 Views)
Hi John,

nidaqmx.tlb is a reference that needs to be added to the project file.

Please open the *.vbp file and then go to Project >> References
In the window that appears please find NI DAQmx C Api and make sure the box is checked.
Alternatively you can click on browse and go to C:\Windows\System32\nidaqmx.tlb

The slider is a Measurement Studio control, so if you don't have measurement studio installed then the slider won't be available.

If you have measurement studio installed please go to Project >> Components
and make sure National Instruments CW UI is selected.

Regards
JamesC
NIUK and Ireland

Message Edited by JamesC on 05-24-2007 01:01 PM

Message 5 of 10
(9,974 Views)
<Deleted body of message as the edit to the previous message submitted>

Message Edited by JamesC on 05-24-2007 01:04 PM

Message 6 of 10
(9,973 Views)
Hi james,
 Thanks a million for thati'm getting the voltages perfectly now. I was wondering if i could trouble you for one last piece of information?
The system i'm updating used to run of a lab pc 1200 ,running off labview 5.1, While the 6024e is now giving me the analouge output i need, there was a digital i/o channel running on the previous system to turn on the pump via a relay to a variable speed drive( ABB ACS 300) to the pump, which is where the voltage is connected to. would you have any suggestions on how to configure the channel to get the same output or on how i could adjust the previous program tostart the pump?
Thanks again
John
0 Kudos
Message 7 of 10
(9,969 Views)
Hi John,

Attached is a new version of the code that adds DO functionality on one digital line.
I used the example code located at C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\Digital\Generate Values\Write Dig Chan  as the base of my modifications.

I am just wondering why you have decided to go to VisualBasic for your updated application rather than using a newer version of LabVIEW?

Anyway I hope this does what you need.

Regards
JamesC
NIUK and Ireland

Message 8 of 10
(9,966 Views)
Hi james,
Thanks a million james just got it working there now, wouldn't have been able to do it without your help, unfortunatly the system i was given to use for the update is out of date so it's too slow for labveiw, an out of date update makes great sense, thanks again though.
john
0 Kudos
Message 9 of 10
(9,956 Views)
0 Kudos
Message 10 of 10
(9,556 Views)