05-26-2015 08:22 AM
05-26-2015 08:23 AM
Try not to send commands in the loop. Send commands once, in the sequence - it means, that you need to add event structure into your code. This is the first thing, which you need to rewrite.
05-26-2015 08:43 AM
@Dennis_Knutson wrote:
One other thing to check is to verify you have the correct serial port. From your other post, you have a USB converter connected to your stepper driver. Disconnect it and the com port should disappear in MAX and Windows device manager. The port number (Comx) is the one you should be using.
Yup, I did that. I'm using the right port
05-26-2015 08:45 AM
@kosist90 wrote:
Try not to send commands in the loop. Send commands once, in the sequence - it means, that you need to add event structure into your code. This is the first thing, which you need to rewrite.
I used an event structure within which I put the 'write buffer' but an error kept popping up saying the sessoin no longer existed from the error port of VISA write. Does that make sense?
05-26-2015 08:48 AM
05-26-2015 08:51 AM
It seems for me, that you didn't pass VISA reference via shift register, that's why you received such error.
But really, follow advises from Dennis Knutson - if you will be able to communicate via some simple emulation program, even with terminal window from MAX, then you will easily translate it to LV code.
05-26-2015 11:05 PM
@Dennis_Knutson wrote:
But you still have not tried an existing terminal emulation program?
While your LabVIEW program is poorly written, it should be able to send the single byte command to turn the motors on.
Nope, I have not. Could you direct me to finding one?
05-26-2015 11:08 PM
@Dennis_Knutson wrote:
But you still have not tried an existing terminal emulation program?
While your LabVIEW program is poorly written, it should be able to send the single byte command to turn the motors on.
Also Dennis, what changes do you suggest I make to make my code better? You said it was poorly written so, I'm open to sugestions 🙂
05-27-2015 12:28 AM
05-27-2015 12:35 AM
@Dennis_Knutson wrote:
I already told you one program that you can try - putty. There are others such as terraterm, hyperterminal, etc. Google for terminal emulators. You've also been told some suggested changes such as using an event structure to only send with a value change instead of constantly sending in the while loop that you have.
I did try the event structure but that didn't work like I mentioned, but yeah I'll try the terminal emulators and check. Appreciate the help