This is my first time using LabView and a NI DAQ so I'm sorry if this is a silly question.
I have a PCIe-6321 device that I am to use to implement a real-time PI controller that reads data generated by third-party software. The data is an x coordinate and a y coordinate in ascii. I have used LabView to design the controller and convert the coordinates into voltages which are fed through the PI controller.
My question is: how do I feed the ascii coordinates into the 6321? I believe I should be able to do this using DMA or similar so it is in real-time.
Apologies again if this is a basic quesiton.
Solved! Go to Solution.
A DAQ board like the 6321 captures *signals* and digitizes them. ASCII is not a signal so it makes no sense to talk about putting ASCII into the DAQ device. And if the ASCII characters are displayed in the window of another program, LabVIEW won't be allowed access to that program's internal data.
It doesn't sound like you have the right combination of equipment and software to make this work. Whatever 3rd party program gives you ASCII either needs to:
- be modified to *be* the PID controller
- be modified to offer up the data in a form that LabVIEW can access. UDP perhaps.
Thanks for your reply.
My apologies, I think was inaccurate with my question. I don't want the 6321 to read the raw ASCII data from the third-party, but rather simply output the required voltage after the LabVIEW PID has finished its calculations.
Is it possible to have LabVIEW software read the ASCII data from the third-party software if said software is outputting that data to a bus? Right now it is using a com port.
Sorry again for the basic questions.
Sure, you can use LabVIEW to read ASCII values over a serial port connection, but you'll need to keep your expectations realistic. There will be some significant delay for:
- 3rd party app to acquire eye-tracking info
- 3rd party app then converts to ASCII and sends it over serial
- LabVIEW app reads ASCII data from serial port and converts to numbers
- numbers fed into PID algorithm
- PID output result written to a DAQ task
- output data is then transferred to device so it can be converted into an actual physical signal
I wouldn't expect to handle anything like 100 Hz control bandwidth. Just guessing, but you'll more likely be limited to somewhere in the 1-10 hz range.
Thanks - I realised I was thinking about using the 6321 and LabVIEW in the wrong way. I've found the LabVIEW serial port examples so I'll use those as a basis for sending data over the serial port.
We are definitely aware of the delay in data transmission and we are in the process of exploring other options for acquiring and processing our data (centroid data from a camera). It will almost certainly involve the removal of the third party app.The 6321 itself is replacing a different controller.
Thanks for your help! It's been very useful to talk as LabVIEW can be tricky to learn at times.