12-09-2014 11:30 AM - edited 12-09-2014 11:32 AM
Hello,
I’m trying to read the process value from 7 Omron E5CK temp controllers. I’m new to LabView especially working with serial communication. The VI. I created does work but it’s horribly slow, I can only imagine that there is an easier way to read the values. Basically I just copied the “Read Proccess Value VI” seven times and tossed in a waveform chart and a write to file. Ideally I would like to take one sample of the values every 30 min. and write to an excel spread sheet. I’m measuring values of multiple large water tanks that change temp very slowly so speed is not a concern I just want to create a reliable VI that can run for days at a time. There has got to be a more efficient way of doing this. Eventually I would like to expand to 14 controllers. The Controllers can work with RS-232C and RS-485 communication. Any help or tips on cleaning up my VI would be greatly appreciated.
Thank you for your help.
Chad
12-09-2014 12:23 PM
12-09-2014 02:36 PM
I’m using this Initialize VI to set up my serial port before I run the VI I posted earlier. I would like to figure out a way of combining them into one VI but have not been able to get that to work yet. Like I said this is all new to me so I’m still trying to learn all the steps. When you say an Array of commands and pass them into a For Loop. I’m using the same command and just changing the port number so just build an array with the seven commands I have listed and then where do I tie them into to? I appreciate the help do you happen to have an example VI or something I could visually see what you are explaining. I appreciate the help the help.
Thank you,
Chad
12-09-2014 03:12 PM
Is this somewhat along the lines that you were recommending?
12-09-2014 03:27 PM
12-09-2014 03:44 PM
one extra remark about your initialize vi
You close the connection when you don't have an error.
In case of no error keep the connection, don't close it.
Furthermore why communicate in parallel, why not to every device after each other, a time frame of 30 min and normally you should get an answer within secnds.
12-09-2014 05:21 PM
Dennis,
I don’t have a good explanation for the while loop except for the fact that it allowed the program to run that way. I can place all my code in For Loop but than not sure how to wire the write to file outside of the loop. Is the picture below any closer to what you had in mind? Sorry for being such a novice but I guess I need to start somewhere.
Albert,
I have them wired in parallel because it was the only way I knew how to make it work. I just need a way of recording the process value of each controller every 30 min to a spread sheet. In my head it sounds simple to just take a snap shot of the temperature and write it to Excel but getting the code to work without using all of my systems resources I’m having trouble with. I’m not looking for anything fast just a simple date and time stamp of each tank temperature. Once I get the VI working I would like to take the Temp sample once every 4 to 6 hours threw out the day.
Thank you both for your help
Chad
12-09-2014 05:34 PM
12-10-2014 06:50 AM - edited 12-10-2014 06:51 AM
I don't have your subVIs, but you should be aiming for something like this.
12-10-2014 09:55 AM
Thank you Crossrulz,
This helps a lot I will try to reconfigure my VI to look like your picture. I imagine were you have the Address in I just put all my channels in some sort of array and feed them into the loops?
Thank you,
Chad