LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stepper, VISA

Hey guys, it's me again 😉 

 

so I have been trying to control my stepper motor, via it's driver, via VISA on LabVIEW because the driver has a UART interface. 

 

Anyways, I have been trying to control the motor for a couple of hours now and nothing seems to work and I'm really looking forward to some help. This is VERY Urgent. 

 

Attached to this question you wll find the schematic diagram of my setup, the driver's manual and the instruction codes for the stepper motor. I assumed I can simply add these instructions (attached) to the "write" box to control the motor but I guess I was wrong. 

 

Looking forward to the very productive and helpful response I always get from you guys 🙂 

0 Kudos
Message 1 of 21
(3,789 Views)
OK, well the first thing I notice is that LabVIEW is going to be writing the same data over and over again as fast as it can. You should modify your code so that it only send data when you click.on a button.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 21
(3,761 Views)
Oh and you have no support for reading data from the interface...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 21
(3,751 Views)

Since this is a LabVIEW Forum, it would be most helpful to us (the people trying to help you) if you post LabVIEW code as "usable code", not pictures of code.  There are two ways (at least) to do this -- attach a VI (or a Zip file of a Project or multiple VIs), or create a Snippet (from the Block Diagram, select your code, click the Edit menu, and choose "Save Selected as Snippet", which makes a .PNG file that, if you embed it as an image in your post by clicking the Insert Image button, the 10th button in this Message Window, we can drag into a blank LabVIEW Block Diagram and get it to magically become LabVIEW code).

 

Wow -- sorry about the long-winded parthentical remark.  But I hope you get the idea -- we like working with LabVIEW code.

 

Bob Schor

Message 4 of 21
(3,734 Views)
You don't have an error indicator so it's impossible to say if something is generating one. Please add that.

And even before playing around with LabVIEW, try a program such as putty to send/receive commands. I didn't see anything in a quick read of the manual about a termination character. It would be unusual if one was not required.
0 Kudos
Message 5 of 21
(3,699 Views)

This is kind of off-top from my side, but I didn't know about VI snippet - that it's possible to put it on the block diagram as a code... Thanks!

0 Kudos
Message 6 of 21
(3,673 Views)

Okay guys, thanks for the help but unfortunately my stepper motor still does not work. 

 

I think there's something definitely wrong with my VI. and it'll be great if you guys could modify it and attach the VI back. I'm pretty sure it's the VI because there's nothing even showing up in my error box. I'm still new to LabVIEW so if you guys know better methods to make this work out please let me know.. 

 

 

0 Kudos
Message 7 of 21
(3,637 Views)

Unfortunately, I can not even open it, b/c I'm using LV2013...

0 Kudos
Message 8 of 21
(3,627 Views)
Why do you think it's the VI? Why would there be an error with just a write? Errors do NOT occur with serial writes, even with nothing connected. Did you try using a different program as I suggested? Did you try contacting the vendor? No one here can help much since no one here has your hardware.
0 Kudos
Message 9 of 21
(3,622 Views)

@Dennis_Knutson wrote:
Why do you think it's the VI? Why would there be an error with just a write? Errors do NOT occur with serial writes, even with nothing connected. Did you try using a different program as I suggested? Did you try contacting the vendor? No one here can help much since no one here has your hardware.

Well if that's the case then I guess I was wrong to assume that. I did not know that. Thank you 🙂 

 

Anyways, I really doubt if any of the my hardware is malfunctioning because I did test my converter by shorting the TX and RX connectors and it worked. (although there was something pretty weird about that program, everytime I wrote a character, it would read it immediately and infinately, as in everytime I wrote 23 it would show up us 232323232323... I think that's because of the while loop I used yeah? ) I just ran the code I attached in my previous post and I checked to see if there was any current in the stepper motor wires and I didn't find any. So I guess that means whatever I'm sending from my laptop isn't going to the driver. I think that boils down to two scenarios, 1. I'm sending the wrong code. 2. My driver chip is faulty. 

 

Do you guys agree? Or is there something I'm missing out on?

0 Kudos
Message 10 of 21
(3,608 Views)