Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Picomotor 8751-C labview block diagram issues

i everyone,

 

I'm having issues on running this program.  I am new to labview (1 week) and am trying to use the picomotor to move it in one direction for now.  I have nested a While-Loop within a For-Loop.  The user puts in 3 inputs:

 

1.  xStart - The starting position.

2.  xStepSize - The size of stepsize sample points the user desires.

3.  xEnd - The ending position.

 

For example, if a user wants to start at 1 micron away from the starting position and wants to take 1 micron sample points and then can enter where they want to end, 11 microns away from the starting point of 1 micron. So it will take 10 sample points at 1 micron each until it reaches 11 microns.  Hope this makes sense. 

 

I decided to use the While-Loop for the stepsizes and add it up by each iteration until it is greater than or equal to the xEnd.  This was then nested within a For-Loop that iterates it once and the xStart is on the outside of all this.  I have attached the diagram for a better understanding.

 

I am also having VISA issues.  I keep getting this error:

 

VISA:  (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.

 

I tried to change the timeout of the VISA but still receive the same error. 

If anyone can help me out with this I would really appreciate it!

Download All
0 Kudos
Message 1 of 7
(6,604 Views)

Hello JonRod, so the problem is that the program gives you an error (besides the VISA error) or is only the VISA error you are getting? If so, what is the error?

Do you see the error at the very beginning of execution, or after it runs for a while?

If you use one of the examples attached with LabVIEW (Find Examples in the help menu) for VISA communication, does the picomotor work?

 

Eric_NI

0 Kudos
Message 2 of 7
(6,590 Views)

Thanks for the reply Eric.  I appreciate your help.  I've modified my diagram a bit and ended up taking out the for-loop since I decided I didn't need it.  After the modification I was able to get rid of the VISA error I described in my previous thread but now I am receiving the error:

 

VISA: (Hex 0xBFFF006B​) A framing error occurred during transfer. 

 

I've been through the other forums that shows a solution that shows how to create a new block diagram, VISA Flush I/O Buffer VI described here:

 

 
But I don't think I know enough of the VISA and Signal communication, even with the online resources, to figure out my problem.  I tried to create the VISA Flush I/O Buffer VI but when I tried to run that I get this error:
 
VISA:  (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.
 
I have also tried to go online in the forum but the answer doesn't really make sense to me since I have only started to learn LabView a week ago.  I have attached my new, modified pdf version of my block diagram.  Thanks again.
 
Jon
 
0 Kudos
Message 3 of 7
(6,585 Views)

I just decided to continue on and ignore the error for the current VISA error.  It seems to work but it doesn't seem to want to get out of the While-Loop now.  Even though I've configured a shift register compare the values of the xStepsize and xEnd.  If the value of xStepsize is equal or greater than xEnd it should be designed to leave the loop and stop ('sto' command in the case structure) the movement of the xStepsize and xEnd motors.  From the previous pdf image am I doing something wrong with the loop?  Thanks.

 

Jon 

0 Kudos
Message 4 of 7
(6,583 Views)

I got it.  It was easier than I thought.

0 Kudos
Message 5 of 7
(6,574 Views)

JonRod, was the problem solved then? Bear in mind that you can also use the examples that ship with LabVIEW to learn about VISA and implement them in your code.

 

Eric NI

0 Kudos
Message 6 of 7
(6,569 Views)

Hi Eric,

 

Yes that particular problem was solved but have encountered yet another error:

 

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/VISA-Error-1073807339/m-p/2020546

 

Yes, the person before me did use a lot of the examples but I have had to make a lot of changes to this main block diagram so I'm not sure if I'll have to make changes to them or not.  Sorry, my knowledge of Labview is limited right now....still learning!

 

Jon

0 Kudos
Message 7 of 7
(6,561 Views)