Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication with multiple temp controllers


@Dennis_Knutson wrote:
Put a Build Waveform function on the block diagram, right next to the 1D array that exits the for loop.

No.  We are dealing with different channels here.  1 sample in the array for each channel.  Therefore the Build Waveform should be inside of the FOR loop and then have an autoindexing output tunnel on the built waveforms.  The result will be an array of waveforms that can then be written.



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 21 of 29
(3,730 Views)
What I was thinking was a single waveform with multiple reads but yes, the results would look weird. You are correct. This would also have a timestamp for each read as opposed to just one.
0 Kudos
Message 22 of 29
(3,726 Views)

Process Value 7 Controllers test 6.jpgI inserted a “Build Waveform” Block into the “For Loop”  but now I don’t have a way of wiring an input to it, I get broken wires. I attached my VI if thats of any help to debug my situation.

Thank you,

Chad

0 Kudos
Message 23 of 29
(3,720 Views)
Insert a Build Array between the output of the case statement and the Y input.

You still need to get a timestamp and wire that to the Build Waveform. That's the whole point of this exercise.
0 Kudos
Message 24 of 29
(3,712 Views)

Does this look a little better?  I have not had a chance to run it on the hardware yet but will give it a shot in a bit.  

Thanks again for your time,Process Value 7 Controllers test 7.jpg

Chad

0 Kudos
Message 25 of 29
(3,704 Views)
You want to write to t0 and not attributes! Right click and change it. You want to write the current time so use the function on the palette to get that instead of a time of zero.
0 Kudos
Message 26 of 29
(3,694 Views)

Thank you! I think I got it with all your help! I let in run for a couple hours last night and worked great.  Its writing about 16 samples per minute to my Excel file I just need to figure out how to slow it down to take about a sample ever 30min.  If I could create a delay were I could adjust it from like every 30min. to every 4 hours that would be great.  Better yet would be to figure out a way to tell it to take a samples as specified times of the day like 12pm , 4pm, 8pm, 12am, ect.   But if that takes a ton of additional code I would be happy with just an adjustable delay.  Thank you again this is exactly what I needed.  So much appreciated for all your time. 

 

Process Value 7 Controllers test 8.jpg

0 Kudos
Message 27 of 29
(3,688 Views)
For short delays, you can just use the Wait(ms) or the Delay function. For anything longer than than a couple hundred milliseconds, use the Elapsed Time function. This has a Boolean output that you can wire to a case statement that you place your existing code inside.
0 Kudos
Message 28 of 29
(3,681 Views)

That worked great.  Everything seems to be working after all of this.  Thanks for the leaning experience

Chad

0 Kudos
Message 29 of 29
(3,671 Views)