Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Yesterday
  3. I can't find any announcement that that NI SoftMotion, CompactRIO, or the NI 9503 will be discontinued. Where did you hear that?
  4. I don't have a canned solution for velocity profiles. I'm sure there's something nice out there. It might be possible (though, probably there's quite a bit of effort involved) to roll your own controller. You could use a 9401 to output a PWM signal to something like an H-bridge, if you're micro-stepping, you'll have to use another module, maybe a 9221, to measure the current out to the motor, etc.
  5. We are using NI Softmotion, cRIO and NI 9503 to control stepper motors now. But since NI will discontinue these products we need to look for replacement. I just want a controller which I need to send command to tell motor move for a certain distance with a pre-program acceleration, velocity profiles. Thank you for answering my question.
  6. What c-series module are you using? In the project, if you right-click the module under the FPGA target, some have the option to change their I/O between calibrated and raw. In this case raw would probably be much easier to work with.
  7. What sort of interface are you looking for? RS232? What controller are you using? PC? CRIO? Soft motion rather fancy—what sort of features do you need? Just regular acceleration, velocity profiles? Encoders?
  8. I believe if your word length is 16 bits and the integer word length is also 16 bits and mark unsigned you will have a FXP data type that will contain the UINT16 properly.
  9. Hi, I am looking for an option to replacement of NI Softmotion + Stepper modules to control 3 axis stepper motors. If anyone has experiment with this please give me an advice. Thanks in advance.
  10. Hi all, i try to generate a sinewave in FPGA (NI cRIO Platform), to do that I use the specific VI (Sine Wave Generator) for fpga to produce a sinewave in UINT16 data type. Unfortunatelly my AO module works with FXP data type (see attach) and I need to adaptd the UINT16 to AO module. A simple cast is not sufficent because I loss information, any suggestion ?
  11. Thanks a lot! Now I see - I didn't know, that there is no exact standart for it.
  12. I never use the wizard. I used the online documentation and wrote VIs by hand.
  13. The "pretty print" includes a length check, and keeps small objects compact. You can see it in the code; it's 40 characters or less, I think. This was added to improve the readability of arrays of small objects. Unfortunately, "pretty" is subjective, and it is hard to come up with simple rules that work for all possible input JSON.
  14. Drat, still not having any luck with this. I am going to see if this works in a VM.
  15. Let me, please, also ask a question regarding the toolkit. Currently to prettify JSON string, I use function Reformat.vi. But, no matter which value of "Pretty Print Levels" I set, the output is the following: { "Item":{ "Property1":{"Name":"Property1 Name","Active":true}, "Property2":{"Name":"Property2 Name","Active":true}, "UID":43, "Active":true } } But, I'd like to have it as the following (with prettified nested objects): { "Item": { "Property1": { "Name": "Property1 Name", "Active": true }, "Property2": { "Name": "Property2 Name", "Active": true }, "UID": 43, "Active": true } } Is it the expactable behavior, or some kind of bug - that somehow it does not prettify nested JSON objects... JSON itself I generate using Unflatten JSONpath Array to Object.vi function - as inputs I set JSON paths, and values - and after that, Reformat.vi is applied... Thanks a lot in advance, Sincerely, Ivan.
  16. Thanks James, Keep up the good work, it's some getting used to working with JSON in LV.
  17. Thank you very much! It works for Array Data Pointer! I used float array (Size: 16) and read the first 3 values. Thanks a lot!
  18. Oops, sorry... I didn't notice CL_RenderingDATA. This means the union is 64 bytes long. Try using a cluster of 16 SGLs, and only read the first 3 values. Or, try changing the parameter configuration: Type: Array Data type: 4-byte Single Dimensions: 1 Array format: Array Data Pointer Minimum Size: 16
  19. This is the program. It can run to CL polling measure.vi libclapi.dlCL-500A.llb
  20. Thank you very much for this kind reply. I tried this method (A Cluster that contains 3 SGL numbers, and use this cluster to to tell the CLFN how to interpret the data.).But it will show this error or the program crashed.
  21. Last week
  22. I haven't (yet) implemented an "any depth" wildcard character, but if you know how many levels down the item is, you can use wildcards for each level: $.*.*.*.*.NID_PACKET
  23. This has nothing to do with a CIN whatsover. CINs were a legacy technology in LabVIEW 3 and 4 before LabVIEW learned to interface to shared libraries (*.dll on Windows and *.so on Unix). What you are doing is not a wrapper either in the sense as it is usually used by me and others who are regularly dealing with this. A wrapper is another shared library written in C/C++ that interfaces to a certain API and translates it into a more LabVIEW friendly shared library interface that can be more easily interfaced with the Call Library Node. You are trying to create a VI interface library to your shared library. And that is always a tricky business. For one the Call Library Node can't interface to every C feature out there. C++ object interfaces, callback pointers and also complex structures with embedded pointers are all things that can't be done with the Call Library Node (or in the case of complex structures with embedded pointers only with a lot of pain and by handcoding in LabVIEW what a C compiler would normally do mostly automatically). The import library wizard you are trying to use for this is an amazing piece of software but despite its name NOT a magician. And extracting all the necessary information from a header to safely interface LabVIEW to a C shared library would be a truely magical feat, since the C syntax does not cover all the necessary details about buffer management and such things. This is only documented (if you are lucky) in the prosa library documentation that comes with your shared library. If you are unlucky you have to figure it out by guessing from naming conventions of variable names and lots of trial and error (meaning: crashing, restarting, editing, saving, crashing, goto begin). This is true for using a shared library in C just as much as in any other language including LabVIEW. So even if the import library wizard can import all your functions you really have to go through each generated VI and manually check that the generated code is actually correct. Also the generated code is in an attempt to be rather safe than sorry often unneccessarily inefficiently programmed, which is another thing you should be changing. Of course this all requires that you know exactly how the shared library should be interfaced and if you really do that you end up very quickly with the constation that creating all those interface VIs from scratch by hand is not only about as fast as going through the import library wizard and then painstakingly check each of the VIs by hand, but also creates more efficient interface VIs with something more meaningful than the ugly standard light blue import library wizard icons and totally unpractical connector panes. The import library wizard for instance can't know that in a function like: int32_t MyAwesomeBufferReader(int32_t *buf, int32_t bufSize, int32_t *bufRead) the second parameter is the size of the passed in buffer and the third is the size of how many data was actually filled in the buffer. It doesn't even know that the first is not just a pointer to a single int value but rather a pointer to an array. The C syntax does not distinguish between a pointer to a scalar and a pointer to an array, except that it allows to usually write int32_t MyAwesomeBufferReader(int32_t buf[], int32_t bufSize, int32_t *bufRead) to show that the first parameter is actually an array, but this is not used by many programmers despite its increased readability (probably because some ancient C compilers didn't know about this syntax with an incomplete array size and some libraries are still written to compile even on computers that you can only see in musea anymore). The first variant will likely default to a VI with an int32 value "bufSize" as input and two int32 value "buf" and "bufRead" as output and if you select the option to treat return values as error it will enter the return value into the error cluster as an error if it is not 0. It will also corrupt memory (and likely crash at some point) whenever being called with a bufSize value greater than 1! The proper VI (just going from the somewhat arbitrary naming of the parameters) has however an int32 "number of samples to read" as input that says how much data should be read, and an int32 array output. Before calling the shared library function the interface VI should allocate an array of "number of samples to read" in length and on return of the function should use the "bufRead" value to resize the array to the actually returned data and then pass it back through the array output of the connector pane . The interface VI should hide all the buffer management details from any caller of the VI as otherwise you are going to expect every user of your VI to know not only about C programming details in general but about the actual programming interface of your shared library function. A totally unusable LabVIEW VI as such! No automatic wizard in the world could be thought this in any way, and even what I just wrote is usually only a reasonable guess based on the parameter naming, which in C has absolutely no meaning in any way. (The actual parameter names can be left away completely in the function prototype without any adverse effect when using the function, and the names in the function prototype can be also completely different to the names in the actual function declaration, if the programmer wants to do that to obfuscate his code even more.) The actual library documentation would hopefully explain in detail what each parameter is meant to mean but you can't point an automated tool at a PDF or HTML file and tell it to extract any exact programming information from the prosa text in there.
  24. I'm not entirely certain what your use case is, but I have found that Bookmarks in Word and Named Ranges in Excel are useful with the RGT for updating fields in a template. Especially when provided a report by the customer rather than being able to design our own.
  25. Since there's still an issue with 32 working (but not on some machines) & the 64 bit hanging when trying to relink the dll to the installed PQ libraries, I tried to create the CIN wrappers automagically. The process gets stuck and becomes beyond my current knowledge. Don't know how you did it but kudos to you Mr. Powell! I'm sure you wrestled with this a bit. 😬 Looks like multiple .h files need to be referenced. libpq.dll needs the libpq-fe.h which in turn needs the stdio.h, postgres_ext.h & pg_config_ext.h according to: https://doxygen.postgresql.org/libpq-fe_8h.html Just selecting a few basic options like open/close was not successful & returned: "The library specified for this node cannot be found or cannot be loaded." Do you remember how you did it?
  26. Is it possible to directly access a particular object somewhere deeply nested inside the JSON text with a JSONpath that doesn't require knowledge of the complete structure? The structure can be altered outside the application, the field however are specified in official documents and should be used. E.g. I want to get the Packet object that has NID_MESSAGE 0. { "ALE (TLE)": { "length": 48, "message_type": 3, "FIE-PR": { "type": 198, "length": 37, "TCEPID": 1987771643, "UNISIG-037 SaPDU": { "ETY": 0, "type": 5, "DF": 0, "UNISIG-026 Message": { "NID_MESSAGE": 136, "L_MESSAGE": 24, "T_TRAIN": 13969, "NID_ENGINE": 103, "Packets": [{ "NID_PACKET": 0, "L_PACKET": 114, "Q_SCALE": 0, "NID_LRBG": 6980601, "D_LRBG": 11133, "Q_DIRLRBG": 0, "Q_DLRBG": 0, "L_DOUBTOVER": 0, "L_DOUBTUNDER": 0, "Q_LENGTH": 0, "V_TRAIN": 0, "Q_DIRTRAIN": 0, "M_MODE": 0, "M_LEVEL": 3 }] }, "MAC": "368268A6E6112334" } } } }
  27. Hello there, Is there any way of plotting multiple graph like for example ( please refer the screenshot) If i click on just the plot M1 I need to popup another bar graph Please let me know any suggestions for this Thanks in advance
  1. Load more activity
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.