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.

Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

read following error .flx

Solved!
Go to solution

Hi to everybody, I'm new at Motion Control and I'm not be able to read the following error in a motion system using "read following error .flx" in LabView.

Could  somebody give me advice please? In max I can see that it is possible to read the following error and to dispaly it in a graph. I need to use the value of the following error to perform other operations.

 

Thanks in advance

 

Edo

0 Kudos
Message 1 of 8
(4,439 Views)

Edo,

 

I need some more information before I can help you:

  1. What motion control board type are you using?
  2. What's the operation mode (servo, open- or closed-loop stepper)?
  3. "read following error.flx" is the correct function. What do this function return during the move?
  4. Do you see any errors? Does MAX report a modal error?

Thanks,

Jochen Klier

National Instruments

0 Kudos
Message 2 of 8
(4,438 Views)

Johen, thanks for reply so fast.

 

1.-  I have a PCI 7356 board, MID 7654,  LabView 8.2.1

2.- Operation mode is Servo.

3.- The function does not report any error but it does not give any value of the following error. A question about that: How this function works? Does it send the values to a buffer or not?

4.- When I perform movements using max there are no errors. I have only an error related to end of run of the motion stages, because I haven't been able to configure it on the MID 7654 (This will be my next question in the forum, I think there is no relation with this question)

 

Thanks again

 

Edo

 

 

 

0 Kudos
Message 3 of 8
(4,430 Views)

Edo,

 

thank you for the information. The very same function is used in MAX to read following errors, too, so it doesn't make much sense to me, that you see a following error in MAX, but nothing in LabVIEW. Could you please post some example code, that demonstrates how you are using the function?

Please note, that the following error for a well tuned axis could be zero, when the axis is stopped, so a zero value does not necessarily indicate a problem.

 

Thanks,

Jochen

0 Kudos
Message 4 of 8
(4,428 Views)

Jochen,

 

My program is based on an LabView example for one axis movement. I only added a loop with velocity override .flx and the read following error .flx function, the first one works very well but the last one doesn't. With respect to the following error it should have a zero value at the end of the movement but not in the middle. I saw that in Max.  

In the attached program position is in mm but  not in count.

 

Thanks

 

Edo

 

 

 

0 Kudos
Message 5 of 8
(4,423 Views)
Solution
Accepted by topic author edolch

Edo,

 

there are several issues with your vi:

  1.  Your vi generates an onboard program and you start the while loop, which should probably run on the host, in parallel to the End Program Storage function. This results in a race condition and you can't tell, if some function calls of the while loop get stored in the onboard program or not. Probably this is the root cause of your problem.
  2. The while loopruns without timing. This results in 100% Host-CPU load and a very high communication loadfor the onboard CPU. Yo ushould add some timing in the 20 to 100 ms range.
  3. The example that you have used just demonstrates the usage of onboard programming but from an application point of view onboard programming is not required at all. The same functionality just works fine in a host program. This is a quote from another thread, but it's also a good fit for this one:

    "Could you please explain, what you are trying to accomplish with your onboard program? In general there are only very very few applications that really require onboard programs. Onboard programs don't run significantly faster than host programs and they also don't run with better determinism, as they are executed in a low priority task on the 68331 on the board.

    A typical usecase for an onboard program is stopping a move, if forces become too high by monitoring an analog input, but they ar rarly used for implementing complete move sequences, as there is almost no real advantage for tasks like that."

I hope that helps,

Jochen

0 Kudos
Message 6 of 8
(4,405 Views)

Jochen

 

Thanks for your support. This is a brief explanation wath I have to do:

 

1.- I have to perform a movement, to begin in 1 axis. This is an easy task because I can use the motion assistant.

2.- I need to measure the following error during this movement in order to use this data to move another motion system wich is piezoelectric based. The last system will correct the error of the first one motion system.

 

According to your explanation I understood that I don't need onboard programing to perform this application.

My doubt is How to include the following error measurement in a program, for example a code generated with motion assistant. Do you know if are there any example about that?

 

Thanks for your help,

 

Edo 

 

 

0 Kudos
Message 7 of 8
(4,402 Views)

Edo,

 

you are correct. Onboard programming is not the solution for your task, but I also feel a bit uncertain about your approach in general. The 73xx motion control boards provide a relatively slow interface to the host PC, which is ok for all standard motion control applications, but not for customized control tasks that rely on data read from the board. You won't be able to read the following error faster than about 200 samples/second and there will be a significant amount of jitter, too.

 

The whole issue sounds very similar to another discussion, that I have had in the forums just recently. Depending on yourperformance and accuracy requirements, the answer to your question is probably the same: NI 73xx devices are great for standard motion control tasks. For everything that requires customized control, NI-SoftMotion is a much better option.

 

 To answer your question about Motion Assistant: This software is an easy to use interactive prototyping tool for standard motion control applications. If the performance of your current hardware really meets your needs (which I doubt), Motion Assistant doesn't offer enough flexibility to solve your application.

 

Jochen

 

0 Kudos
Message 8 of 8
(4,381 Views)