From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-22-2013 12:41 AM
Thank you.
When I run the code it gives me an error saying an invalid parameter has been set for the step size? Could you please explain a little? That would be most helpful!
Tania
10-22-2013 12:42 AM
Sorry , missed out a word there, I meant could you please explain the code a little?
Thanks
Tania
10-22-2013 05:56 AM
Can you send me error message snapshot please ?
Mahendar
10-24-2013 01:47 AM
I have attached the files.
Many thanks,
Tania
10-24-2013 01:51 AM
Sorry it didn't get attached in the previous post! Here it is!
Tania
10-26-2013 11:47 AM
Hi Tania,
As per your snapshots, you have not given control mode value as input. You have to set 1 for open loop mode and 2 for closed loop mode. When you are writing code, I think you might not have connected to hardware. If so, you have set simulation mode in APT configure( addition set up) program. See attached files.
mahendar
10-26-2013 12:37 PM
regarding open loop mode, you can't work with setposition in this mode. I think you could try with setvolatge command in code as attached. There is a specific relation between volatage and positions and it is linear. If you go through manual, you can relaize this. the use setvolate as attached code.
Mahendar
10-28-2013 12:23 AM
Hi Mahendar,
I understand.
In my experiment, light from the sample falls onto the surface of a photo detector which is connected to a DAQ card, I now want to add the code for this to the driver's code so that the final result is a graph of voltage versus position. I have attached the combined code for you to have a look at. Currently there is a slight difference between the time the code takes to record the position and the voltage. The end result is that I am getting four sets of results: position and its time, voltage and its time. Then I plot the data in microsoft excel and eventually get rid of the time columns.
Thanks,
Tania
10-30-2013 04:56 AM
Hi Mahendar,
I think that code works fine.
Could you just help me understand what the part in your code at the top right does? So you enter a stepsize, it's divided by 20, then 1 is added to it then it truncates to the lowest integer? If your stepsize is 0.1 for example this comes up to a very big number? And then in the code you multiply the number of iteration by the stepsize and that gives you your position? Could you please explain these two? Why has it been set this way?
Many thanks!
Thanks
10-30-2013 08:29 AM
Hi Tania
There are two types of inputs that can be given to piezo. if you give position, at calculates the voltage required for moving that position and initates. usually this is preferred in closed loop mode, which i am using now. Since, you asked about openloop mode, I wrote code with setvolatege command. I meant to menton the stpesize not in microns but in volts (equalent voltege of the stpe size) if you are working in openloop mode.if you work in closed loop, change setvolage to setposition. what loopmode you are working in?
Mahendar