Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Automate temperature controller

This is most definitely a coding issue in that your code is not acknowledging the read quick enough. You should post this in a new thread in the general LV forum and you can link back here to give context if needed, but that will get you better responses. 

B Sampson
Ceres Bio Fuels
0 Kudos
Message 21 of 32
(1,693 Views)

you need parallelize you monitoring code, I also suggest you parallelize your step setup code. Each part zone controller code need its own tread.

Now you are using single-thread programming which is not a good idea in LabVIEW.

I think your code architecture lead to your problem because controller/monitor program has to wait for other part of codes and a lot of time was wasted on I/O.

Read some materials on LabVIEW parallel programming and it will solve your problem.

0 Kudos
Message 22 of 32
(1,692 Views)

Unfortunately parallel will not work, since I cannot send multiple commands to controller at one time. Behind each monitoring VI is Visa Write and Read functions. 

0 Kudos
Message 23 of 32
(1,683 Views)

Have you tried? serial I/O is for sure not going to be paralleled but other part of code could. Does each zone controller has its own address?if does, for sure, you can parallelize your code. You code for sure could be parallized and it is very easy.

You problem is clear, some part of code waiting for I/O too long time. And the whole architecture is wrong.

0 Kudos
Message 24 of 32
(1,680 Views)

Yes I tried in the very beginning. I used several while loops 1 for each zone. However, when I run the process it tries to send several write command for each address and timeout error occurs. 

0 Kudos
Message 25 of 32
(1,676 Views)

you need make a queue for write and another queue for read. a master thread dealing with two queue, collecting write request and distributing received data read from the controllers. A few worker (three for your case) thread send write request and wait for read data for the queue.

Doing these, you can easily expand your code for hundreds controllers.

0 Kudos
Message 26 of 32
(1,667 Views)

Thank you, now it's more clear to me. I will consider this option.

0 Kudos
Message 27 of 32
(1,646 Views)

Wow, I never would have figured this out without yangfh2004's labview code, thanks! Even then, it took me awhile. In case it helps anybody else, attached is my python code. I'm using it to control a furnace I bought from MTI Corp.

0 Kudos
Message 28 of 32
(1,356 Views)

"I am also working on the same Yudain temperature controller device, but I am a beginner with LabVIEW. Is there any chance you could share the LabVIEW driver VI with me?"

0 Kudos
Message 29 of 32
(383 Views)

Hi, please use this GitHub repo for the LabVIEW driver https://github.com/yangfh2004/yudian-ai-508

0 Kudos
Message 30 of 32
(367 Views)