Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication with multiple temp controllers

I re-configured my Vi how does this look? 

Chad

Process Value 7 Controllers test 3.jpgProcess Value 7 Controllers Front Panel 3.jpg

0 Kudos
Message 11 of 29
(3,155 Views)

I tried running the above VI and no luck.  I changed the value to 7 wired to the N of the For Loop and it scans through all 7 controllers but then only writes and charts the value from the first controller.  I feel like I’m getting a little closer to having it work properly but still not there yet.  Any feedback would be great.  Thank you all

0 Kudos
Message 12 of 29
(3,140 Views)

You should not wire up the N.  The autoindexing tunnel will determine how many loops the FOR loop will run.  What you should be looking at is the To Dynamic Data Type node.  Make sure it is set up to accept an array of channels.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 29
(3,135 Views)

Still not having any luck getting this to run right.  My “Error Query Vi” will not work inside the For Loop so I moved it outside and it will run.  My write to file data only gives me a time stamp on the first row.  I would be willing to pay someone for their time to just make this work correctly.  It’s beyond my skills at this time and what sounded like a simple way to collect data is turning out to be a fun learning project but costing too much time for a hobby.  May just have to go back to recording the data manually.   I appreciate the help and am always open to suggestions or tips.  Thank you,

Chad

 

Process Value 7 Controllers test 4.jpgExcel Data.jpg

0 Kudos
Message 14 of 29
(3,121 Views)
I don't understand why you are getting any date/time at all since you not passing it to the Write to Measurement File. It can't write something it does not receive.
0 Kudos
Message 15 of 29
(3,115 Views)

How am I not passing it to a write to measument file?  The blue box in the upper right of my block diagram is a "Write to Measument File".  Or at least it says it is and I have used it on other VI's without issues.

0 Kudos
Message 16 of 29
(3,110 Views)
You are not getting the current date/time in your code. You are not including it in the array that you create and pass to the write function. Maybe the express function is different/changed. I never use it and with other file I/O functions, you must explicitly create it yourself.

You can use the existing file function if you create a waveform data type and add the t0. Or, pass an array of strings to a Write to Spreadsheet File with the date/time as element 0.
0 Kudos
Message 17 of 29
(3,106 Views)

Dennis,

  This does make sense to me.   How is my program going to know what the date and time are to write to the file?  I like the idea of making the first block in my array a get Date and Time function.   I will try and figure this out.  Do you or anyone else have any use for an Omron E5CK Temp. Controller?  I’m willing to trade one of my controllers for someone to help me create this VI.   I will pay for shipping and you can keep the controller.  I’m just running out of time and would like to get this VI running remotely so I don’t have to keep manually entering the process values in to an excel spread sheet a few times a day.  I breed Japanese Koi fish and have multiple Ponds / tanks that I need to track the water temperature of throughout the year.  If anyone would like a Temp Controller to use to help me create this VI I would be willing to ship for free as a trade for creating a working VI that will run correctly for me.

Thank you,

Chad

0 Kudos
Message 18 of 29
(3,087 Views)

Dennis,

  I tried adding a couple diffent time and date stamp blocks to the array, tried the first block of the array and also at the end of the array.  When I run the VI it gets stuck in the While Loop and does not pass any data past that.  I also tried adding the “get date and time block in other parts of the code and it just created errors.

Chad

Process Value 7 Controllers test 5.jpg

0 Kudos
Message 19 of 29
(3,082 Views)
That's just silly. You don't add the date/time to your addresses to test.

The simplest method is to create a waveform data type as I said. Look on the time palette and grab the function that directly creates a timestamp. Put this inside the whole loop but outside the for loop. Put a Build Waveform function on the block diagram, right next to the 1D array that exits the for loop. Select/expand the build waveform inputs so you have a t0 and y array inputs. Wire the timestamp to t0 and the 1D array from the for loop to the y array input. Wire the output from the build waveform to the write file function.
0 Kudos
Message 20 of 29
(3,076 Views)