02-15-2011 02:19 PM
I actually figured out how I could do it. I just stored the output of the LSB and MSB as local variables and put them into a table.
Thanks.
02-16-2011 10:22 AM
Glad you got it working. This is what I was suggesting, though, for your reference:
Hope this helps
02-27-2011 12:47 PM
So I am now getting better values sometimes, but LabVIEW is reading the wrong values sometimes since Things are coming in from a while loop and going through true/false conditional loops. What is happeing, is LabVIEW enters the while loop, but while the loop is processing, values change, so my DAQ readings are wrong. I tried to use some logic to filter out these bad readings with a "select function", but since values that go into these loops are only processed once at the beginning, a bad value sneaks by.
In my attached .vi file you will see that from my PortA.1, I have the signal running into a true/false conditional loop and then to a "select function" gate. This is supposed to filter out any bad signals if my PortA.1 ends up going "high" after the while loop has already started to run again. But since the true/false loop only reads this value at the beginning of the process, and somtimes changes after the loop has begin, this allows these bad readings to sneak by. So I feel I am just having bad timing issues with everything. Is there a way to process this PortA.1 value while in the true/false conditional loop? Or do you have any other suggestions? I tried storing the value as a variable but that didn't seem to work either.
Thanks for the additional help.
02-27-2011 02:40 PM
You really need to eliminate those local variables. Pretty certain you have a race condition. You already know how to use a shift register. Why don't you do the same?
Having constants wired to the while loops termination terminals is also bad style.
02-27-2011 04:29 PM
So I got rid of my stored variables and used shirt registers. I am running into issues with my MSB and my LSB not storing themselves into the table. My output only flashes either the LSB or the MSB and never together. Why is this? My output also flashes a blank array inbetween each of the LSB and MSB outputs. That is why I used the stored variables, because it did not cause this issue.
Thanks.
02-28-2011 12:17 PM
Hey archimedes,
Just to follow up with dennis' point, take a look at these docs:
http://decibel.ni.com/content/docs/DOC-2239
http://zone.ni.com/devzone/cda/tut/p/id/7585
http://digital.ni.com/public.nsf/allkb/4F3CC921B4179F9F86256A3B0045CE2D?OpenDocument
As to your current problem, it looks like you are not properly accessing the correct array, so you are deleting data. As you can see from this picture, you are always inserting data, in every loop, into a blank array:
So what you should instead do is this:
You don't need the case selector, since you already have a case structure performing the same function.
Hope this helps,
02-28-2011 12:43 PM
Thanks for the help I really appreciate it. I will give it a try.
-Nick