Jump to content

Object Oriented Programming for DAQ and Instruments


Recommended Posts

Hi,

 

Recently I have been trying to develop a set of classes for data aquisition (as the encapsulation makes other tasks easier) however I keep running into several issues (described below). I was wondering what you guys did for your OO DAQ systems. I've found a few presentations lying around on the net but their implementations do not seem to work when using DAQmx based measurements.

 

I am trying to measure the inputs from two seperate instruments: (1) Torque Sensor (2) Encoder. Sometimes these instruments might  be using a DAQmx analog input and other times a .DLL.

 

My original thought was that I would have a parent class called Measurement with several functions (Initalize, Configure, Read Data, Close) that would be over-riden by its children Analog Input (DAQmx) and Digital Input (Seperate .DLL). There then would be (for example) an Analog Input object created called position and a digital Input object called torque. This seemed to look nice on paper, however it didnt work as my DAQs tasks need to be combined (you cant have several tasks on a single device.)

 

As this didnt work, I approached it with a different setup. This time I had a parent class called Instrument that has two children Torque Sensor and Encoder. Again, things get tricky, as sometimes I might want to use an analog DAQmx task for both the Torque Sensor and Encoder. 

 

What is your typical OOP class structure like for DAQ?

 

Thanks!

Edited by df_rob
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By agilentvee
      hi all
      i use GOOP to design object 
      1.i download GOOP by VIPM refer to attachement 1
      2.i create two simple object ,and set relationship refer to attachement 2
      3.it show error message refer to attachement 3
       
      my question :how to solve the issue?



    • By Zyga
      LAVA users,
      We are looking for alternatives for NI DAQ devices for industrial automation. Since NI has its devices mostly focused on advanced/high speed/high precison data acquisition/processing its prices are inadequate to simple automation tasks. 
      I would also say that NI PC based daq systems are expensive if need to be distributed systems (found this but still relatively expensive cRIO required).
      Just now we need to extend our compactDAQ based system with two DIO modules. We even have free chassis slots for this, but station that needs this IOs is few meters away from PC. How easier would it be if we could use single ethernet cable..  Ofcourse we can add another small cDAQ (what we probably going to do) but this is slightly expensive solution for our customer.
      Does anyone have some experience with 3rd party solutions? Any known daq devices vendors? Standalone ethernet daq modules?

      Regards,
      Zyga
    • By Gab
      Hello Everyone,
      Need some verification with daq program.
      I have one force sensor that connectd with my usb daq device. with this force sensor, unknown object is connected(hanging) and i want to find the mass of this object (F=ma) so i am taking continous sample and generate waveform graph. After the scaling, my waveform will be in Newton unit.
      my question is: if i take RMS of this waveform(1d Array data point) and divide by g (9.8 m/s2) then whatever value come is my correct mass? (F=ma).
      Thank you in advance
    • By Atron100
      hi
      i have a question in basic understanding of update rate sample rate samples per buffer and cycles per buffer.
      i have DAQ 6343 and electronic circuit. 
      i'm using AO0 for generation sine wave at these frequencies 10Hz, 100Hz, 500Hz, 1kHz, 3kHz this signal enters to electronic circuit.
      and after conversion i must to measure two outputs of this circuit by AI2 and AI3.
      from my understanding of tech spec of the daq analog output update rate is 900kS/s and analog input update rate is 500kS/s
      as i understand if i have freq = 3kHz the maximum sample rate per buffer is 300 samples
      and if i have freq = 10Hz i can generate this signal with 90000 samples per buffer?
      for analog input the formula is the same?
      that meaning of cycles per buffer?
      which sample rate of AI i need to setup to measure data fast and accurately? 
       
      thanks for answers
    • By Leif
      My test group has decided to start using OOP (beyond LVOOP I hope).
      The question is should we use an OOP tool and which one: GOOP/GDS or G#?
       
      I'm quite biased as I have used GOOP for a number of years, but I'm trying make fair investigation. I also realize that the StarUML plug-in in G# could be very useful.
       
      Has anyone made or seen a comparison between GOOP and G#?
      Or do you have an own opinion?
       
      (Searching for the text "G#" isn't that easy...)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.