Screw vs Express SoftMotion function blocks

Hello

Are there differences between express screw SoftMotion function blocks? I intend to drive a servomotor through a NI 9505. Examples AND show how using function blocks, but I've been advised to use the screw Express instead, work around odd behavior when using a simulated axis (http://forums.ni.com/t5/LabVIEW/SoftMotion-quot-Update-Buffer-quot-VI-refuses-to-take-more/m-p/22508...

Thank you!

Hi JKSH,

If I booted up a new application, I would use screw Express on function blocks. Here is a list of things to consider when choosing:

  1. By default, function blocks are asynchronous. They run on the rising edge of the entry "run" and are carried out when the output "done" is high. They do not block and function block architecture will almost always call the same function blocks again and again in a loop. You control the flow of execution with the 'run' and 'done' entry and exit. Screw Express, on the other hand, are synchronous by default. They don't have an entry not "run" and instead start running as soon as they are called. They block also until the end screw Express can be converted to asynchronous by right-clicking on them and by changing the "calendar model. When you change the calendar in asynchronous model, the Express VI will now act exactly like a function block.

  2. In general, you should never mix asynchronous and synchronous API. Your application should be one or the other. If it is possible to have safe synchronous and asynchronous calls, you must be very careful and really know what you're doing.

  3. To my experience, write simple applications is easier with a synchronous API, and more complex applications are better suited to an asynchronous API. Since blocking synchronous calls, you need more loops in your application and it can become difficult to maintain.

  4. There is also the property node / API call, on which are based the functional blocks and screw Express. You can do a right click on a function block or Express VI and convert it into a Subvi to see the underlying code. Then the function blocks and screw Express can be pleasant to work with, you must sometimes lower level control that is offered by the property and invoke nodes.

I looked at your other post and it seems that you meet one of the intricacies of asynchronous calls. In point 1 above, I mentioned that function blocks increase sensitive edge on the execute line. In your modified sample and the original sample, the 'Update buffer' function block is executed when space becomes higher or equal to the "size of the Contour data. In the original example, the size of the table is 40, but in your example, it is 100. We will follow the stream through the example:

  1. We do nothing in the first round since we do not see a rising edge of the signal "run" "Initialize the buffer" until the second iteration.

  2. At the beginning of the second iteration, we initialize the table with 20 points, leaving 20 spaces available. This function block can take more than one iteration to complete, so that the loop can run several cycles before the release of "Done" is set to true. In this case, the next block runs.

  3. Then we start the move of contour. No point is taken in the buffer zone This occurs in the part of the user rather than the scan code.

  4. Then, we see that there are 20 spaces available, so we add more than 20 points to the buffer, leaving us with 0 beds available. This means that in the next iteration of the loop, the signal "run" function block 'Update buffer' will be false. This is essential to the functioning of the example.

  5. Since there is no abandonment called, we have a loop around back.

  • Each scan, SoftMotion takes a point in the buffer zone. Finally, the number of available points will be 20. When this happens, the entry "run" will switch from false to true on the 'Update buffer' function block and 20 points more will be added to the buffer. This cycle continues until you stop.
  • So, what was wrong with your changes? You did the size of the table 100 points. If you look at the steps above, you will see that in the example, we have 40 points in the buffer before taking points. If you increase the size of the table to 100, it means that there are 60 places available. However, 60 is always higher than the "size of data contours" (which is 20) and so the entry "run" function block 'Update buffer' will never wrong; We have always more available space than the "size of data contours. Since "run" is sensitive edge up, we are never really new data in the buffer, and so you get only two cycles that you initially put in. I agree that it is difficult, but it's exactly as function blocks are supposed to work and are certainly something to think about when you use the asynchronous API.

    Thank you

    Tags: NI Hardware

    Similar Questions

    • How to write a function block?

      Hello

      Someone knows how to write a function block with LabVIEW?  Something like those in real time live > function blocks >.

      Thank you very much in advance?

      Assuming you are referring to these specifically...

      http://www.NI.com/white-paper/7339/en/

      .. then the answer is that it is almost impossible to make a new. However, there is really nothing special all that to their topic. They are essentially normal subVIs (which you can learn about the other links) which just happened to have some terminals connected to shared variables. I personally would not normally recommend that anyway. If you could clarify what exactly you are trying to do, it might be possible to give more specific advice.

    • The copy function blocks computer after an item is selected, and the computer is responsible for copy

      Original title: copy function

      The copy function blocks computer after an item is selected, and the computer is responsible for copy. It does not matter what size is the copy area. It usually requires a reboot hard to use the system.

      I tried to follow some of the instructions in a full Clipboard and unfortunately that is not the forms of the English spoken by them.

      Any help would be greatly appreciated.

      Denver

      d2n1cart@hotmail'com

      Hello

      We are pleased to know that the problem is solved. Let us know if face you any problem with Windows in the future.

    • What screws do not have functional schema?

      Hi, I am a student at CLAD and theres a question in the details of the all CLAD subjects what VI have no diagram? I read in help this polymorphic VIs Don t have diagram block or façade (Labview help / create Sub_VIs). However, I see that if I double click in a polymorphic VI, for example, reading Key.vi or DAQmx Timing.vi they face before, moreover, they have a block diagram, so miss me this topic...

      I also know that express VI have no block diagram or the façade, them have a configuration window. If I select open option of the façade, the VI express changes to Sub - VI and I have access to front panel or block diagram. So I think that express screws are the screws that have no block diagram. Am I wrong?

      Anyway, it is a doc or a paper that give me information about this?

      Thanks for the responses...

      Polymorphic screws are a single VI who call a collection of other voluntary initiatives. Called on the screws have a BD, but the polymorphic VI himself does not.

      Screw global variable is not a comic book.

      Screw Express dynamically generated code that calls a Subvi, which does all the work. I don't think that it is created as a VI you can actually use until you choose to open his FP, but I don't know the details.

      The controls do not have a BD.

      Screw with the deleted chart is not a comic book.

      There may be others, but I don't see any at present. Overall, I can't say that I really see the value of that question.

    • Outlook Express delete function has stopped working

      I was cleaning my sent folder outlook express and after the removal of the Remove feature has stopped working, I changed my identity and it worked in identity motor of about 100 messages. I need to clean my record sent how do correct the function of deleting keys?

      Thank you

      How is it related to Internet Explorer 8?

    • Application Express listener function

      What is the function of application Express listener?
      I have install oracle 11g and upgrade to apex4.0
      and apex user can visit http://xx.xx.xx.xxx:8080/apex/f? p = 1121
      When need her?

      Hi Lily,

      It is not mandatory to use APEX earphone with APEX 4.0, it is an alternative to the OHS (Oracle HTTP Server) or EPG (Embedded PL/SQL Gateway) as a web server for APEX.

      -Udo

    • What is Labview function block (- 1 gain figure with a red arrow on the top)

      Hi all

      I stumbled upon this code, which has a function with-1 figure with a red arrow on the top of gain?

      What is this function and where can I find it?

      Thank you

      Decrement, ptbypt

    • Can what function block I use in my vi to configure a NI USB6008 of ANALOG OUTPUT.

      Hello

      I have a USB6008 that I use to watch the 3 entries. I would like to add the analog output AO0 to control a 0-5 volts. Which function to use in Labview 2010 for this?

      The DAQ assistant let me only to acquire signals do not generate so I need something similar to the daq but Wizard to generate signals do not acquire.

      Thank you

      Andy

      Each task can contain only 1 channel type so a task DI has all the digital input channels and a task to HAVE it cannot contain the analog input strings there is no way to mix these channels in a single task.  You CAN create and run a job to HAVE and an AO task on the same device.

    • TDMS defragment function blocks for labview

      Hello community,

      I have a few problems with the function of defrag TDMS in LabVIEW 2015 on a Windows 10 machine.

      My Viewer TDMS is crushed during the defragmentation of the tdms file I was trying to open (fragmented 700 MB text file). So I made a simple VI to use as test

      and it always breaks LabVIEW. Then, I tried a smaller file (70 MB) and it went well. Then a 120 MB... Hang again.

      Sometimes, the VI closes just, other times I get this:

      EIP = 0x35023DD4 access violation (0xC0000005)

      I was wondering, if anyone of you have had similar problems with function to defragment TDMS crashing?

      BTW, had no problems to open the same file with LabVIEW 2014 on a Win7 machine

      I also tried to run as administrator.

      See you soon,.

      Oyvind Risla


    • Express__I Outlook were never able to get outlook express to function.__Can I uninstall and start again? Is recommended uninstall/reinstall? __

      Unable to poll for new messages on your HTTP server.  Account: 'Hotmail', server: 'http://services.msn.com/svcs/hotmail/httpmail.asp', Protocol: HTTPMail, server response: 'Forbidden', Port: 0, secure (SSL): no, Server error: 998, error number: 0x800CCC33

      Access to the account was denied. Verify that your user name and password are correct. Account: 'Hotmail', server: 'http://services.msn.com/svcs/hotmail/httpmail.asp', Protocol: HTTPMail, server response: 'Forbidden', Port: 0, secure (SSL): no, Server error: 998, Socket error: 87, error number: 0x800CCC33

      How to add your Hotmail account to Microsoft Outlook Express
      http://windowslivehelp.com/solution.aspx?SolutionID=99d4b13d-13dB-40D8-9cdf-172002d4194c

      Hotmail and MSN accounts POP3/SMTP Access
      http://liveunplugged.spaces.live.com/blog/CNS! F92775FC46A390CA! 422.entry? a = 88094129

      Ask other questions of Hotmail here.

      Windows Live Solution Center Hotmail Forum
      http://windowslivehelp.com/product.aspx?ProductID=1

      Bruce Hagen
      MS - MVP October 1, 2004 ~ September 30, 2010
      Imperial Beach, CA

    • NI 9514 free servo control jig

      Hi, I have a Question because I still don't understand something on my program. First I use a cRIO 9022 and a NI 9514 module with an analog servo AKD drive to control my engine. I already have one using VI scan mode interface and the SoftMotion function blocks and it works OK. The problem is that, from what I understand, this scan mode uses the scan engine clock, where the minimum of research is period 5 ms. I'm running my engine between 500 and 2000 rpm and the "only" thing that I need is to send a signal of TTL output to a given position that I use as a control variable. (I use a NI 9401 for this attached to the block function Position compare). As I said, it works but not very accurate and there are only 2 options, either the control loop is too slow, or it has jitter in the other system I use (I can take images of the rotor and see with precision the angle and 1 or 2 degrees is a big mistake for me, which means that only 0.5 ms in time If I use 720 rpm for example. I'm now 5 to 6 degrees of error).

      If my order is the problem, how can I make sure it's the VI the problem and can I do to fix this? I read here http://forums.ni.com/t5/LabVIEW/NI-9514-FPGA-and-SoftMotion/m-p/2173030#M699003 even if I use FPGA with my NI 9514 I still cannot remove the scan engine.

      Thank you very much!

      Italo

      Hi Italo,

      Here are some answers to your questions:

      -If you can access the PIN Position compare, then you should be fine without the hardware connector that I mentioned in my previous post.

      -The exit of the hairpin to compare position is a TTL signal 5V that you can access and use as your digital triggering.  This will eventually cause at a pace much more reliable that the digital triggering generated you through the 9401 using the analytical engine.

      -Your scanning interface program should continue to work properly.  The program that you are using is able to drive the motor at the rate you were hoping for, the only problem is that we are relying on the analytical engine for digital triggering on the 9401, which does not give you the resolution of trigger, you needed.  Using the PIN Position compare since the 9514 addresses this concern for us.

    • Blocked senders list gets deleted when closing outlook express

      When I close the program OUTLOOK EXPRESS, the blocked senders list are cleared.  How can I make sure that it stays in place to stop the SPAM?

      Hi Madashell_145,

      ·         What version of Outlook Express are you using?

      Follow the steps below and check if it works.

      It is stored in the registry and is probably corrupt. Open regedit.exe and delete this key:

      1. click on start

      2. in the search programs and files, type regedit

      3. under programs, click on regedit.exe

      4. in the registry editor, find the following registry key:

      HKEY_CURRENT_USER\Identities\ {GUID} \Software\Microsoft\Outlook Express\5.0\Block shippers

      where GUID is the long number indicating your identity. After regenerated list export this key so that you can restore it should it be damaged again.

      I hope this information helps!

    • The difference between the expression and the function?

      Could someone please explain me the technical difference? For example, I know CAST is an expression and To_CHAR would be a function, but what differentiates the expressions of functions?

      Hello

      2776946 wrote:

      Could someone please explain me the technical difference? For example, I know CAST is an expression and To_CHAR would be a function, but what differentiates the expressions of functions?

      What is the difference between a bird and an OWL?  An OWL is a special type of a bird.  All owls birds, but not all birds are fun.

      Similarly, a function is a particular type of expression.  All functions are expressions, nut not all expressions are functions.

      In fact, the CAST is a function, but you're not wrong when you say "CAST is an expression.

      Maybe you wanted to say, not MOUNT.  CASE expressions are expressions, but not the functions.

      The technical difference between the functions and the other types of expressions has to do with how they are being implemented and is not all that important to users.  Is DECODE function?  It depends on which version you use.  The Oracle 6, it was a function; in Oracle 8, it wasn't; Since Oracle 9 it is again a function.  I don't know what has changed; Maybe the documentation.

    • SoftMotion "Buffer Update" VI refuses to take more points?

      Hi all

      I'm on LabVIEW 2012, trying to figure out the example "Servo Drive (9505). Here's what I did:

      1. Copied the 'continuous Contour Move.vi axis' in a new
      2. Set up a SoftMotion (simulated axis), using default properties/settings
      3. Set up a Table SoftMotion (slimming, 1 axis, empty buffer)
      4. Adjust the example VI to use my Table axis, and he ran

      Judging from the code, I expect the program of a sinusoid of output continuously until I hit the stop button. However, he stopped after 2 cycles.

      Level curves given in the example are an array of 20 points, so I thought that a buffer of 100 points table was a lot.

      I placed a waveform graph to control the output of 'space available' VI "check for space". This was the result:

      1. For the first iteration, the available space was 80
      2. For the second iteration, it jumped to 60
      3. After that, it gradually climbed linearly to ~ 99, then dropped to 0
      4. He climbed up to ~ 1 the next iteration, and the stopped program

      What is going on? Should space not 20 or less all the time (since the code attempts to write 20 points in each iteration buffer)?

      Mystery solved in a different thread: http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/SoftMotion-Express-VIs-vs-Function-Blocks/td...

      I thought that 'Points of update' will run if "Run" is true, but this isn't how it works. Instead, it is triggered by a rising edge to 'run '. In my example, "Run" is always true, so there is no rising edge.

    • myRIO low level screw

      Good afternoon

      I try to use the low level with a myRIO screw. Here is the block diagram with all deleted except blocks of low digital output (the calendar has also been changed to create a pulse every two seconds):

      I know that there are easier ways to do it, but I'm learning how to use low screw when I run the code, everything seems to work properly (the debugger is normally done without errors), but the result is just 3.9 volts.

      Can someone tell me what I am doing wrong? The project is attached (zipped).

      Thank you

      John

      John,

      I don't know what could be going on here. I tried all three pieces of code you have posted and all of them worked for me. The only thing I changed was I used DIO ports on connector C. I know it's kind of a stupid question, but are you sure that you are using the correct pins on your connector? Are you sure that you have defined the correct lines of DIO in the program? Maybe try the connector B or C to see if those who work.

      You're right in that low screw run more quickly than the screw Express.

      In addition, for the first bit of the code, here would be a better way to structure, using the RT wait next multiple VI to control loop rate:

    Maybe you are looking for

    • HP Pavilion: Farmville2 and pokki

      I'd appreciate any help I can, I just found Farmville2 in my program list and I have not installed it. It does not allow me to uninstall as usual and I was not able to find an uninstaller for windows 10 on the web. There is no wealth like knowledge a

    • I can't download firefox only get a black web page

      I deleted firefox so I could do a fresh install because of download problems. I deleted the application with own my mac that deletes everything about firefox. I tried to download firefox again but I just get a web page of balck in her trying to give

    • Satellite M70-340 keyboard problem

      Certain keys; "capslock, enter, del, arrowkeys, z, x, c, v, b, n, m and some more my M70-340 laptop stopped working since yesterday." Could someone tell me please how to fix this problem. Your help is very appreciated. email is [email protected]

    • Documents appear suspended in the spooler.

      When printing, all documents for all printers show paused in the spooler on Vista PC. Need to go in the spooler and return the documents to print. Vista 32 SP2 and HP and Epson printers running. Removed all of the printers 'Printers' in Vista, re-ins

    • Windows vista is not genuine, even if it is

      After you download the update to vista SP2, WGA notification began popping and says that windows vista is not genuine. -bayabasgirl29