04-25-2017 11:05 AM
So, at the port "byte count" of VISA Read, I should put a constant with a number greater than the longest message I ever expect to receive? But, what do I put at the case selector just outside this VISA Read?
Another thing, I think this wasn't happening before, but the clear plot for the Temperature Graph isn't working. When I press it, the program stops running, but the clear plot for the power measurements graph is working perfectly, and they are implemented equally.
The last thing, is the VISA Close implemented correctly? Because there are cases where the serial port isn't closed.
04-25-2017 11:20 AM
First let me introduce you to the plot visibility checkbox
That will remove a whole bunch of code you don't need and make the UI a lot better behaved.
crossrulz clued you in on that already
Next I'll introduce you to
from the C:\Program Files (x86)\National Instruments\LabVIEW 2016\vi.lib\AdvancedString\ folder. you can use VIPM to instal "Hidden Gems" and have some of these really nice utilities right on your palettes.
Then: You have one (1) Stop button labeled "[ESC]" and three event structures registered for the Value Change Event. When do you think the event will enqueue? (Every Press of the [ESC] button enqueues a VC event for each structure registered for the event - even if the event structure cannot yet execute! so, as soon as you press ESC the first time all event structures have that event ready to go!) THIS IS A PROBLEM.
04-25-2017 12:55 PM - edited 04-25-2017 12:56 PM
@CastroPedro wrote:
So, at the port "byte count" of VISA Read, I should put a constant with a number greater than the longest message I ever expect to receive? But, what do I put at the case selector just outside this VISA Read?
You remove it.
05-02-2017 11:52 AM
Hi,
Sorry for the delay. I was really busy with other projects.
So I made the changes you suggested, and I think it's working now!!
Thanks really much!
Is there anything else I should change in this program? Is the VISA close implemented correctly?
08-30-2017 11:28 PM
@CastroPedro wrote:
Hi,
Sorry for the delay. I was really busy with other projects.
So I made the changes you suggested, and I think it's working now!!
Thanks really much!
Is there anything else I should change in this program?
Yes, Please look at the "Producer Consumer (Events) pattern." You can find that from Menu>> Files>>New... Design patterns.
You may have tried to "Re-invent" a wheel that has been worked out to be much rounder than your attempt. (Look, I tried to do it too, back when I was making every mistake you could make to learn some stuff about software design - I'm still learning)