12-09-2011 12:55 PM
hi, im refanufacturing an inherited code, the original is original.rar and the remanufactured code is re manufactured code.rar
original designers made their code to use ni pci 6221 and they made their program run with "run continously", inside the while loop they perform four data acquisition in a structure sequence, the "actualizar datos" button stops this while loop and check the program inputs as instruments states(on of off) or desired flow.
i re-manufactured this code because is too disordered and not readable, maintainable and scalable.
i used an event producer/consumer architecture to handle with user's interface and perform control actions, and a parallel loop (now disabled, but working good) to perform the system's acquisition.
vv1,vv2,vv3 and vv4 are electrovalves and pp1 and pp2 are waterpumps controled by ac variator in a voltage range of 0-10 v.
i can turn off and turn on vv1, vv2, vv3, vv4, pp1 and pp2, and modify pp1 and pp2 desired flows, but my system does'nt catch this change, i checked hardware and i runed the original code and works good, i think i screw up at re-manufacturing process, i dont know how to fix it u.u.
thanks for help.
ps. if u need more information please read here or ask for it, im working with labview 8.6, max 4.7 nidaqmx 9.
Solved! Go to Solution.
12-09-2011 01:02 PM
I cannot donwload anything from your links, possibly because of departmental firewalls or other problems. Would you mind attaching the two rar files here instead?
12-09-2011 01:11 PM - edited 12-09-2011 01:21 PM
may i send you for e-mail?, this forum dont let me attach .rar files, there are a lot of files and subvi
thanks for help
ps. i changed .rar to .jpg, so rename it and open as rar files, again thanks for your help
12-09-2011 04:17 PM - edited 12-09-2011 04:20 PM
I got the files, thanks.
A more common format would be zip. Why do you insist on rar? Any particular reason?
Here are the two hierarchies as a zip file for others who potentially want to take a look at it. (I don't really have time at this moment).
12-09-2011 04:54 PM
Thanks for bundling this up as a zip.
Why are "LITROS PP1" and "LITROS PP2" arrays? It seems like a simple numeric control would work.
You have your analog outputs on different channels than the original. In the original the PP1 output was on AO1. In yours PP1 is using AO0.
The same is true of PP2. The original used AO0, you use AO1.
See if that's enough to fix your problem.
As a side note you should properly stop your DAQ tasks using the Clear and Stop VIs. Each time your loop executes you create a new DAQ task, configure it, write to it, and abandon it. It would be better to configure and start all of them once and just write to the appropriate one based on what you write to the queue. Though it's hard to be too critical given what you started with.
12-09-2011 06:04 PM
thanks altenbach, i ll try .zip files now, i use .rar because i always have problems installing winzip, but nevermind ^^
thanks wart, that's the problem, i checked and ao0 and ao1 where changed, sorry but i've inherited that code and documentation, and about array or simple numeric control i've being working on that, i don't understand why do they used array, about it, i have a question, does array variables use more machine resources?
about initializing channels and tasks at the begining of the code i think is a good idea, but i want to ask you how could i wire or connect the tasks i created to acquisition part of the code? i thought i could use daq asistant.vi, what do you think about it?
regards
12-09-2011 06:13 PM
@pedrorivera wrote:
... because i always have problems installing winzip, but nevermind ^^
Why would anyone install winzip??? 😮
Creating zip archives is built into any new version of windows (right-click...send to ... compressed folder). For more functionality, install 7zip. Works great, is open source, and is free. ( I actually used it to open your rar files. 😉
12-12-2011 11:09 AM
jeje, thanks, ill try 7zip in my next question ^^