04-28-2023 06:30 AM
HI!
I am encountering a couple of troubles trying to wok with a system of my own which generate a WF signal and write this signal, using a cDaq-9179 and a 9252 module into a coil. Then, i receive the current values from the coil and read them with Labview, using 9263 modules.
The thing is, I have been trying to work using two different approachs.
1. I try to work with a continuous generation/adquisition while loop. The generation work with, let's say, 100.000 samples rate and a 10.000 samples buffer, and the adquisition works with 50.000 sample rate and 5.000 samples to read as a input for "read daqmx.vi" o just read continuosly. Working that way, my buffer keeps overflowing, no matter if i set the acquisition to be continuous or read a certain amount of samples.
I think the reason for that overflow, which i have not come with a solution for yet, is delay. If i debug my program by plotting generation sample 0 to sample 1000 and same with acquisition, sample 0 to sample 1000, i would expect to always watch the same signal in both plots. I watch the same signal in generation, of course, but my acquisition signal keeps moving, changing phase, suggesting my acquisition samples can not be related at all to my generation and, worse, my acquisition samples can vary within every iteration, being the reason for overflowing.
2. In order to make a certain application (measuring phase change between voltage generation and current at the coil), i do need to relate my generation with my acquisition. Thus, i made a discontinuous labview program which starts and ends a task at each iteration. Doing so, when looking at my acquisition chart, i can notice some delay time, which make the acquisition starts later than it should (send generation, start acquisition and notice how the current remains 0 for ≈ 0,1s. After that time, the acquisition starts to follow the supposed generation. That would be no problem if i could quantify that delay, but it changes within every iteration, thus, i can not quantify it.
I would really appreciate some help.
Thanks in advance!
04-28-2023 07:12 AM
Imagine that you hire a LabVIEW Expert to help you with your problem. You bring her into your Office, turn on your computer, and say "But first, you must put on this blindfold, as I cannot allow you to look at my LabVIEW Program. But don't worry, I'll tell you what it does, and then you can tell me why it doesn't work, and how I can fix it. OK?".
We know a little bit more. You are using a cDaq-9179 and 9252 modules, and a 9263 module (and I can "look it up" to see what these do). I know your buffer sizes. And that you would really like some help.
Why not help us by attaching a compressed (zipped) attachment of your Project Folder, with some hints where we should focus our attention?
Bob Schor
04-28-2023 07:52 AM
Thanks for the wit, it's always appreciated.
I am sorry for not attaching a single thing, i didn't know what the usual procedure was. I am a little afraid too of the program being unintelligible for everyone but one, not due to its complexity but due to my bad wire management, mainly.
I am uploading MAIN_V7, wchic works on continuos generation/acquisition
I work with no regeneration and with my devices working at maximum rates (100.000 samples rate for generation, 50.000 samples rate for acquisition). I have tried reducing both rates but overflowing keeps happening.
I am trying to upload my project but i am getting an error when publishing the message ( (application/octet-stream)), so i am uploading the VI and SUBVIs, which should make the program work. Sorry for the inconvenience
I would appreciate any help.
Thanks again.
04-28-2023 08:17 AM
Are you developing within a LabVIEW Project (which using a LabVIEW Project file, .lvproj)? If so, you might have all of your VIs in a "Project Folder". Are all of those VIs you attached in a single folder with not much else? Is there a Project File (.lvproj) in the same folder? If not, please do the following first:
Now you want to send all of these files to us in a convenient way for us to use them. Do the following:
Bob Schor
04-28-2023 08:53 AM
I tried to, but I get an error when uploading it. I will try to get the whole project uploaded.
Thanks again and sorry.