Jump to content

ShaunR

Members
  • Posts

    4,856
  • Joined

  • Days Won

    293

Posts posted by ShaunR

  1. Yes, that is correct however, for a normal VIs this is great.

    For a larger dist with libraries and class I found it was much slower.

    The reason being that all code in the directory was handled i.e. open/checked/compiled.

    But due to the above VI relationships this was slow.

    What I did to optimise it was to only point to a VI Tree so one VI gets handled.

    I don't have any benchmarks recorded but it was actually something I wanted to discuss with you.

    I don't know how the JKI install works, but you are right.

    You only need to compile the hierarchy from the top level VI (which is what your VI tree is doing) rather than compile every VI..

    I scan all VI's and see if they have any parents (lone VI's - these will be the top level VIs) then compile "Entire Hierarchy" only for those VIs and just save all the dependants. Opening a reference is quick, but compiling isn't. The advantage of this method is that you don't need a VI Tree VI (so it's more generic) and, for a couple of hundred VI's you only end up compiling a small subset and the compilation process is smart enough that shared VI's that are already compiled and/or saved are skipped (or so it seems)

    It's no really an issue in 2009 because it's all very quick. But 2010 is such a slug (installing SQLite API in 2009 takes about 20 seconds. In 2010 it's about 1 minute i.e 3x slower)

    • Like 1
  2. Hi everyone,

    I was trying to connect labview and Microsoft robotics simulator based on this link : http://decibel.ni.co...t/docs/DOC-9214

    everything goes fine until when i am running the SimluatedNIcholas.vi i am asking for a microsoft.dss.enviroment.dll that i can not find it anywhere. Does anyone have an idea or the same problem sometime?

    Thanks

    I've never used it....but a quick Google revealed that not only you have this (and similar) problems.

    v8kjdw.png

  3. Sorry, I wasn't being smart, I was saying the solution is to skip them (in your script).

    I doubt VIPM can do it, and I hope NI can't do too - as that means there is a security issue with using PP in my VIs (if I choose to) IMHO. I am pretty sure Locked VIs also get skipped during a mass compile in LabVIEW.

    Hmmm.

    I wasn't aware that mass compile skipped anything.It doesn't say anything about skipping in any logs when it comes across a password protected VI. angry.gif

    Thats unfortunate. It means that a password protected VI is no more portable than a VI with the diagram removed. I had always thought of password protecting to be a better solution because having the diagram meant you could re-compile for different platforms/versions.

  4. It is a bit inelegant but I have come up with a solution. I create 10 string controls (more than I think I'll need) and get references to them. I then position each of the ones I need based on the range of the x axis and then hide the ones I don't want. A bit messy but it works fine.

    You could draw your own axis using the 2D picture plot functions (2D picture plot). The downside is you don't get all the zoom candy etc.

  5. I am thinking that if you don't have the password you can only just skip over them.

    Indeed. But not really solution though. I'm hoping I'm just missing something obvious since the mass compile (and presumably the VIPM) can do it, however the mass compile only scans directories, rather than project trees.

  6. How do you re-compile a password protected VI?

    I have a couple of VIs that are password protected, and a little tool that goes through a project, recompiles it and returns any errors and what they are (which then goes into a database)

    The mass compile copes with it no problem and simply compiling from 2009 to 2010 shouldn't be a security problem. But I can't find a way to do it.

    The open VI reference takes a password parameter so I presume you can't get a reference with that. And getting the reference from a project returns error 1040 (password protected) when the compile script node executes. Any ideas?

  7. I added VI wrappers with error terminals for Wait (ms), Wait Until Next ms Multiple, and Tick Count in LV 2011. Look for them in vi.lib\Utility\timing. They're not the ideal solution, but until we get error terminals on the primitives, at least we can stop having to worry about maintaining our own copies.

    -D

    I would suggest replacing them in the palette (like the space constant ;) '). I've been using my ones for over 10 years so it's not really a maintenance issue, I appreciate the thought, but really the primitives need to be changed.

  8. ShaunR, those are serial interface cards. It is not clear to me that they will work for my purpose: The encoder emits quadrature pulses through the serial interface, but I need a COUNTER to read the position, then poll it from the PC. I don't think a simple serial interface card will do this.

    Well. NI also do counter timers. But it is's really a sledge hammer to crack a nut. Whenever I come across devices like I think you are describing, I always use a PIC to convert whatever in to RS485 and have a nice serial ascii value returned (you can even do stuff like streaming to the PC). Cost less than $5 a throw, much more reliable and has a huge saving on cabling in multi-device environments. And once you've done it once, you can use it on virtually any obnoxious interfaces with a bit of software tweaking.

  9. Hello,

    I have an optical position encoder (actually three of them, one for each axis) that transmits electric signals according to RS-422 standard. There are two quadrature channels (A and B) and a reference/stop channel.

    How to read this in LabVIEW?

    There is an expensive NI solution: the NI cFP-QUAD-510 4-Axis, Quadrature Encoder Input Module for Compact FieldPoint. This also requires a chassis and LabVIEW RT, which we don't have. Seems like overkill to me.

    There are third-party multi-axis RS422 counters with, say, an USB interface like this one:

    http://accesio.com/g...usb-ctr-15.html

    Unfortunately this one won't work, because it can't read quadrature signals.

    Actually having an added display would be nice. So what I am looking for is a box which accepts 3 or 4 RS-422 inputs and has a display for the counter and a USB, Ethernet, or serial interface from where I can get my position.

    Any suggestions?

    RS422 is multi-drop and can be cabled for distances up to about 100meters.. You can have all your devices hanging off of one RS422 port (up to 12 or 16 if memory serves). If you can get all your devices with a RS422 interface then you won't need to mix and match with USB. Make sure, however, that the devices are really RS422 compliant. Some manufacturers say that they are 422 when really they are point-to-point but with RS422 line drivers (i.e not addressable).

    I highly recommend the NI RS422/485 cards. for the PC end.

  10. If you Google for

    connection closed by peer

    you will find this is the standard description for this error for lots of programming APIs. For example

    http://technet.micro...y/cc957018.aspx

    This is one of those cases where LV described the behavior using industry standard terms, which is sometimes a "damned if you do, damned if you don't" situation... very helpful for those who know the networking standards and are working in LV, somewhat misleading for LabVIEW programmers working with networking standards.

    If only we had a "ping" function wink.gif

    • Like 2
  11. Hi there ,

    Currently we use Atmel programmer i.e sam-ba v2.9 for downloading the bin file into the microcontroller using USB-JTAG (Jlink ). I require to do the same using Labview .

    The dll is available for the same .

    I registered the dll successfully and using function "Automation open" the methods under it are available .

    But i am unable to use the methods successfully .

    for e.g the method Scan requires input as a pointer to a table where the list of devices are located ,

    the data type of the input is U8 , so if i input a value of 0 , it gives me an error ..

    Can anybody help , how can we pass pointers in Labview

    The example code snippet given for the method in the manual is as given below,

    CHAR *strConnectedDevices[5];

    for (UINT i=0; i<5; i++)

    strConnectedDevices = (CHAR *)malloc(100);

    AT91Boot_Scan((char *)strConnectedDevices);

    Please help .... :frusty:

    Tan

    P.s attaching the library files

    The char * is simply a C string and it's unfortunate you are using an activeX component since you you can pass that to and from a dll with the string type drop down selection in a code library node.

    An array of strings is a different matter since there is only a selector for an array of numeric types and although you can de-reference the pointer; you don't know how long the string is in each element (unless they are fixed length)

    Dereferencing pointefrom C/C++ in LabVIEW is is a fantastic article with execelent examples for many data types. The VI you will need is the Xnode GetValueByPoionter.

    However, Moveblock

  12. Please check out my new blog, the Gun Book Review, when you have a few minutes to waste. It's a tongue-in-cheek parody of serious review-type blogs where I'll discuss one of the things I do for pleasure (when I'm not programming in LabVIEW).

    War and Peace next? The one book I'd rather shoot myself than read rolleyes.gif

  13. Hi,

    I am trying to read sqlite files in labview of 350 mb size in a computer having 3 gigs of ram and has windows xp.

    I could read txt files of that size in this computer, even with a 2 gig ram. but, unable to open files of size larger than even 80 megs.

    I run into out of memory problem. Is there any way I could read this kind of files.

    The SQLite API is quite capable of reading 350MB plus files (I've just read a 450MB one). Your issue is probably to do with LabVIEW memory management.

    If you are putting an indicator on the front panel. Don't. biggrin.gif

    LV Memory Memory Management 101:

    File-size 456MB win 7 X64 LV x32

    500 for the VI 0 wire junctions Requires 500 MB during and after execution.

    500 MB for the VI, 500MB for the 1 wire junction, 500MB for the 1 indicator. Requires 1.5GB whilst executing (assuming it has already run once) and 1 GB after execution.

    Add 1 more indicator and it will run out of memory. Why?....Because.....

    500MB for the VI, 1GB for the 2 wire junctions, 1GB for the 2 indicators. Requires 2.5 GB whilst executing (assuming it has already run once) and 1.5 GB after execution.

    Very approximate calculations, but I think you get the idea.

    1. You need n x wire junctions more memory whilst running than you do with a static VI after execution

    2. you need n x indicators memory to store the results.

  14. I don't think there is anything inherently complicated about creating Xcontrols any more than creating a class. The issue is though, is that you cannot inherit from a pre-existing control (class?). This is what makes it not worth the effort since even for a simple control (a numeric for example) all the existing properties and methods have to be re-written Instead of just writing the additional functionality.

    Therefore you don't write all the normal properties and methods for that control type and end up with a specialised control, with limited functionality, which is only useful to you ( and even then, probably in only a couple of scenarios). However, if you could inherit all the properties and methods from, say, an x-y graph and just add a bit of code to add a trend-line. then that would be worthwhile.

  15. Hello!

    Is there any possibility to get the size of an array from a reference to the array?

    Since the data type within the array is unknown, I can't convert it to the actual data type and then use the built in 'array size'.

    Thanks in advance!

    //Lars Mellberg

×
×
  • Create New...

Important Information

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