LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

failure at re manufacturing code

Solved!
Go to solution

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.

 

.:. Pedro Rivera .:.
i love to work and develop on labview, this is real fun!!!
Photobucket
0 Kudos
Message 1 of 8
(3,146 Views)

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?

0 Kudos
Message 2 of 8
(3,142 Views)

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

.:. Pedro Rivera .:.
i love to work and develop on labview, this is real fun!!!
Photobucket
Download All
0 Kudos
Message 3 of 8
(3,138 Views)

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).

0 Kudos
Message 4 of 8
(3,122 Views)
Solution
Accepted by pedrorivera

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.

 

 

 

Message 5 of 8
(3,116 Views)

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

 

.:. Pedro Rivera .:.
i love to work and develop on labview, this is real fun!!!
Photobucket
0 Kudos
Message 6 of 8
(3,111 Views)

@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. 😉

0 Kudos
Message 7 of 8
(3,106 Views)

jeje, thanks, ill try 7zip in my next question ^^

.:. Pedro Rivera .:.
i love to work and develop on labview, this is real fun!!!
Photobucket
0 Kudos
Message 8 of 8
(3,066 Views)