10-20-2016 10:43 AM
Hi guys,
I am in need of some help. I am trying to make a small program that does a few things:
1. Spin a stepper motor with no encoder (via serial RS-232) a set amount of time
2. Take a reading from a mitutoyo indicator (via another RS-232 serial)
3. Repeat N times.
I think that notifiers would do but I need some other opinions/solutions. I think that a state machine would benefit me here, which I am familiar with, but with multiple communcations going on, I am not sure the best way to achieve this. I have attached my VI, which I hate, and have stopped development on.
Any pointers would be greatly appreciated.
Eric
10-20-2016 11:42 AM
It looks to me like you have over complicated this.
A simple state machine is all you need. I do not think a producer-consumer (queue) is even needed here.
Also you are initializing your serial port every time you read? That is a problem.
I would have a state machine that does this.
10-21-2016 08:51 AM
I appreciate the help. I think I have it but I want to keep this open if any other questions arise. Thanks again.
10-21-2016 09:35 AM
Why dont you just make a linear VI?
10-21-2016 10:35 AM
@Eric1977 wrote:I appreciate the help. I think I have it but I want to keep this open if any other questions arise. Thanks again.
For the benefit of the forum, could you post your solution? This is a help forum, and you could end up helping someone. 🙂