LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

please answer soon

I am student of university, and I programmed with labveiw  , we have GPIB card in our lab,and we have a nano stepper, that connects with GPIB.we want do some moving with constant velocity when we give frequency  and amplitude to  program, nano stepper moves in a loop,goes toward, and back ward, please help me,I wrote it but it didnt work!!!
Najima
Download All
0 Kudos
Message 1 of 11
(3,865 Views)
Hi student without a name,

"it didn't work" is not a very good explanation of your problems!
What didn't work? Communication problems? Problems to get correct answers? Nanosteppers don't react?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(3,853 Views)
Hi student,

some more hints:
- try to use style guide: left-to-right wiring, no hidden wires
- try to use less sequences or (when really needed) use flat ones

I think, untitled.vi is your main vi (and there are a lot of missing subvis!). There's a while loop which could be your control loop. But in this loop no values are changed! So you initialize your stepper once before the loop and in the loop nothing happens...

Could you: save your main vi as "development distribution" (file-> save with options) to attach all subvis?
And please explain what exactly is broken!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 11
(3,845 Views)
hi,Smiley Tongue
it dosent react!!I thought that my program has some problems because when I used another program that write with visual basic6 that has the same algorithm it works, it moves with constant velocity,forward and backward.
a attach another subvis that I used.
Najima
Najima
Download All
0 Kudos
Message 4 of 11
(3,843 Views)
hi GredW,
another subvis,
thanks for helping,I want this loop does these actions:first it moves forward,then backward

Najima
Download All
0 Kudos
Message 5 of 11
(3,840 Views)

I didn't look at your code.

When debugging a system, people always go for the software..  But it is necessary to isolte parts of the problem.  The first one being (from your statement "it didn't react") :  do the step motors "react" without software control?  In other words, isolate the system from the software.  Are you able to communicate, send the correct impulses and make the system "react" without automation? 

How do you communicate with the device?  Can you communicate manually?  If so, does it work?  Work your way backward to the software.  And within the software, isolate the different (sw) blocks for each function.  And follow Gerd's advice on coding.  😉

Also remember to have fun.  <<very important>>

RayR

0 Kudos
Message 6 of 11
(3,822 Views)
Hi student,

well from the vis I cannot tell what's wrong.

But I can give some more hints:
- in each subvi you use the same kind of read/write sequence. Why not make one subvi just for the read/write access with handing over all parameters? Then you also don't need this global variable for setting the mode of the GPIB access. I already demonstrated how to do this in the "U$.vi"...
- you set the timeout of the GPIB very often. This parameter only sets the time LabView will wait for any reaction of the device, it's not the time to wait for a (real) action! To set a value of 1000000 doesn't make sense (to me)...
- your "gear" vi didn't have any connectors, so I had to redo this part - maybe there is some error in it now...
- you should use the error cluster coming out of (nearly) every LabView function - they provide some information in case of communication problems!

Try to avoid unnecessary conversions, your "to double" is not needed here. But you better put in some type conversion for the timing functions! Everytime when there's a red dot at the input of a function LabView has to convert to a different datatype with possible (rounding) errors.

My main assumption is: you handle the timeout wrong and maybe there's a problem with wrong parameters for the wait functions.


Message Edited by GerdW on 11-20-2007 02:07 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 11
(3,816 Views)
thanks  alot,for vis.can I set time 0 value?and how can I convert of my version  of vis to another one?
Najima
0 Kudos
Message 8 of 11
(3,778 Views)
Hi Najima,

you can set the timeout globally using "Set Timeout" in the GPIB palette. Usually I set it to 3000ms which should be sufficient for all GPIB devices.

What do you mean by "convert my version of vis  to another one"?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 11
(3,746 Views)
Hi,
I mean that I want to change my vis from 7.1 to 7,what should I do?

thanks
Najima
0 Kudos
Message 10 of 11
(3,714 Views)