Jump to content

germ

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by germ

  1. The ViewPoint systems one works fine and is newer, not that this means it is better.  But honestly I think using a toolkit is optional.  I've generally just always used the tortoise SVN which add right click menus in Windows Explorer.  

     

    I also work in the Lock, Edit, Commit scheme, instead of the Edit, Merge.  What this means is files are read-only until you get a lock.  Once you get the lock the VI is now not read-only.  You make the changes you want, and then commit them which by default will unlock it, setting the file back to read-only, allowing someone else to update and lock. 

     

    So if I'm working on a VI and I don't have the lock I will hit save, and LabVIEW will prompt saying it can't save it is read-only and the explorer window will be opened asking me where to save it.  I will in this window right click my file and get the lock.  I'll then cancel that window and save again, and this time it will save because I have the lock and it isn't read only.  I can do all the SVN operations I want from the explorer window, and don't need to invoke another tool like Viewpoint.  The only exception is for things like invoking compare, and rename, which generally needs to rename both in SVN and in an open project.

    Can you share how you set this up? Is it a setting in Tortoise SVN?

     

    Note that if you have LabVIEW 32 bit on a Windows 64 bit, you'll want to install this additional installer to give the right click menus in 32 bit applications after installing the 64 bit tortoise client.  This is mentioned on the download page of tortoise SVN.

    Yes, I did notice that. Thanks.

  2. Hello,

    sorry to start a new thread on this, but my searches turned out posts that are mostly outdated or relate to SCC tools other than SVN.

     

    So, we have decided to use SVN as our SCC platform. I have setup a VisualSVN server on our Windows 2012 Server and Tortoise SVN client on the developer machines. This is working quite nicely at the file level, but I wonder if we can get more functionality, especially VI comparison.

     

    We are using the latest LV 2015 Full Development System (not Professional Development system). So I understand that I cannot use the lvdiff tool. I have however setup LVcompare as a tool for .vi files in the SVN Advanced Setup.

     

    I found two SVN tools for LV:

    1. JKI TortoiseSVN Tool. This has a somewhat steep price at $200 per developer (10% discount from 5 seats)

    2. TSVN Toolkit from Viewpoint Systems. This is free. However, it states that the latest version supported is LV 2014.

     

    I am interested in the experience from other users regarding:

    Q1. Which of the two tools, if any, do you find useful and why?

    Q2. Does TSVN Toolkit work with LV 2015?

    Q3. Any other tips/suggestions for effectively using LV with SVN?

     

    Your opinion and help is much appreciated.

     

    Thanks in advance.

    --germ

  3. Update: I now have it working....on another computer. And of course it is possible to open the VISA Configure Serial Port VI, sorry for having missed that.

    Either:

    The Terminator character was set incorrectly (to LF while the device expects none)

    or:

    An additional USB hub or two on the other computer prevented this from working.

    I will be able to check only later this week.

    One question I still have: This device can use one or two characters termination, but the VISA serial seems to only accept one. How would I set it up to use CR/LF? Is this possible?

  4. It opens like any other VI for me. I placed it on the BD of a new VI, Ctrl + double clicked it, and got its BD. Arg 8 does indeed appear to be flow control.

    OK, I will try to open it today.

    More than anything, it sounds like you're not configuring your port correctly. "[E]verything is locked" is a little ambiguous - LabVIEW freezes? The VI stops reacting to user input? The VI stops reading data from the device but is otherwise responsive? And what do you mean by a simply command - do complicated commands fail?

    No freeze. The VI works, but after issuing the same command there is no further reply from the device (zero "bytes at port"). The VISA Read then times out if I use the Advanced Serial example.

    It looks like the device has a particular message format, I would verify you're sending those commands correctly, including the right termination character. If you think you have everything correct, post your code (which you probably should have done in the first place). No one has your device on-hand, so we can only offer general advice.

    The funny thing is that this used to work correctly about a year ago.... so yes, I am sending the right commands. Regarding the termination character, according to the device documentation, it is set to "no termination character". The software included with the device should allow to change that, but it appears not to work. That is, if I change the "End of reply" character, it doesn't stick when I exit that software.

  5. Like asbo said, you need to open the VI. Looking at it now, I can see that arg 8 is flow control.

    Well, that's a basic VISA VI. Can't open it.

    Took another stab at it today. Didn't have much time, and didn't get any further. I noticed that the example VIs have both a Basic and Advanced serial port. The Advanced wires the Terminator character, but then has a loop that tries to read the serial port many times.

    Anyway, it all only works the FIRST time I run a simple command. After that, everything is locked when I send the same command. No "bytes at the port".

  6. Thanks Yair...but what's "top to bottom"? The terminals are arranged around all edges of the Configure Serial Port VI icon. There's no "top to bottom" order that I can discern.

    Anyway, it seems that arg8 is the Termination character, which I set to ASCII 13. I will experiment here and report on the solution. Since the native software that came with the device CAN communicate just fine, it means the serial port is working.

  7. I have previously written an LV program to communicate with a US Digital QSB-D encoder (http://www.usdigital.com/products/interfaces/pc/usb/qsb) via a virtual COM port accessed through USB. The computer has a newly isntalled C: drive. After re-installing LV (2009 SP1) I got the "Hardware resource not available" error. Re-installing NI-VISA got rid of that error.

    However, my previous program does not work. I get the following error when calling the "VISA Configure Serial Port (instr).vi": code -1073807194, "property note (arg 8) in VISA Configure Serial Port (Instr).vi->...".

    How can I find out what's "arg 8"? There's no clear sort order to the arguments of that VI that I can see.

    Anyhow, the device can be setup to output CR, LF, or nothing as the "end of response" character. It is currently setup to "nothing". If I use the "Simple serial communication" example, in which, infuriatingly, the "terminator" character terminal is NOT connected and the "user terminator character" is hard-wired to False, then the error happens ONCE, but when I try again I can issue and read a command ONCE. After that, communication is blocked (no data are returned when issuing the same command).

    There is some software that comes with the device, but it seems to reset the device to the above-mentioned state on quitting (very annoying).

    Any suggestions before I go back for another day of fiddling with serial ports?

    Thanks.

  8. So wait, why aren't you using an NI Counter/Timer card? They are awesome at this. Each encoder should be able to use one of the counters, and the other quadrature channel typically goes into the digital I/O port. Your local NI sales can usually do a much better job than I can of walking you through the nitty gritty of picking the right card and connectors.

    You may need a 422-TTL level shifter IC. You can either get one for $1.50 from digikey or if you are allergic to chips, you can get one packaged in a $45 device from B&B electronics, and get another $20 of connectors to make it work with your breakout box.

    jdunham,

    thanks for your reply. I am aware of the $$ NI option. Now we have bought those:

    Counter to USB converter

    Hopefully they will work....

  9. Well you did ask about rs-422...

    Well, yes, but I also explained (obviously not clearly enough) my situation.

    You aaperently are asking about EIA-422 which just desries the electrical charateristics of the wire and associated ciruitry.

    Sorry, but the documentation that comes with the positioner clearly states RS-422.

    You maybe able to use an RS-232 reapeter that use EIA-422. I'd look at Black Box or the like.

    Ben

    No idea what you are talking about.

    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.

    Hmmm....a PIC.....what is that? Maybe this?

    http://en.wikipedia....microcontroller

    I am asking for a finished solution, a box that I can buy. Not a chip or something where I have to spend a month building something around it...

  10. 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.

    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.

  11. 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/go.cgi?p=../usb/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?

  12. I was able to implement what I wanted using Mark's suggestion: An array of clusters, each cluster containing a 2D array. Because the arrays involved are small, this generates a nice, readable TSV file, which can be edited by a human if needed.

    Because the arrays in the clusters are of variable size, I use a delimiter line ("[Ch1A1]"), etc. to mark the end of the array. Writing the settings file is straightforward using the "Convert 2D array to spreadsheet text" and "Write text to file" functions. For reading I wrote a small VI that parses the lines containing the array of clusters by looking for those delimiters.

    As others pointed out, this works only if your settings/ini file is small. And any change to the global variables will necessitate a change to the VIs for saving and reading the settings file. For large, complex files, XML is probably a better solution.

  13. Mark,

    thanks a lot for your reply.

    OK - so this may or may not answer your question, but if all you really need is to serialize a data structure and write it to disk in a semi-human readable form, then you can use the Flatten to XML, Write to XML File. Then use Read From XML File and then Unflatten From XML to reload the data structure. This doesn't preserve a "spreadsheet" style look and feel. It's not clear to me if you have to create a file that you want to load into a spreadsheet and edit and then reload, or if you just want something a human could read to confirm that values are correct or such.

    I saw the XML Vis. I think this would work, but it is overkill. I only want the user to be able to take a peek at the configuration file, perhaps edit a couple of numbers by hand on occasion. A (small) 2D array is actually nicely human-readable in a text file.

    You could also use some tools that serialize to .ini style files, like the ones from OpenG or MooreGoodIdeas (http://www.mooregood...iteAnything.htm)

    Thanks for this pointer. I will take a close look at those VIs.

    As far as your data structure, if I read correctly, you could use an array of clusters that contain arrays - so index 0 - 7 would be an array of clusters, each cluster will contain a 2D array of variable size (and other stuff, if needed).

    This is useful as well. IIUC, by using an array of clusters, each containing a 2D array (instead of a cluster of 2D arrays) I gain an easy way to process the individual 2D arrays.

  14. I have a motor controller that can control 8 different stages. Each motor's step size can be controlled with a parameter called step amplitude. The actual step size in units of length differs for each stage and for each direction. A calibration process exists to calibrate the step size for a given step amplitude. Each axis may be calibrated for different step amplitudes, but those amplitude values and their number may be different for each stage. The 8 stages are grouped into 4 groups of 2 channels.

    What is an appropriate data structure to represent the calibration data in a Global VI and how can I save this to disk in a human-readable form?

    At first, I assumed that all the axis would be calibrated for the same set of amplitudes. In this case, I can use arrays because all the calibration tables are the same size. I used a 4D array. The first two indices are group and channel, the third one is the calibration amplitude index, and the fourth is either the amplitude itself, the positive, or the negative calibrated step size. One problem with this is that there is no provision in LV to save a 4D array to a spreadsheet-like format in a text file, and I could not find an easy solution. Is there one?

    So now I am thinking either of the following two possibilities:

    1) Combine channel and group into a single index (0 to 7). Each stage has its own 2D array of variable size. It has three columns (step ampl., pos. and negative step size) and a variable number of rows. Because the arrays vary in size, I cannot use an "array of arrays", but I need to use a cluster. So I would have a cluster containing 8 2D arrays. I would then write a VI to save those 8 arrays one after the other using the built-in tools for converting 2D arrays to spreadsheet strings.

    2) Same as above but just make the size of the amplitude steps larger than I would ever need to use (say, 10 steps). This way I have 8 2D arrays all of the same size and I can use an array instead of a cluster. The advantage of this is that I am dealing with arrays, so it's easier to write loops to handle the storage/retrieval, and it's also easier to show them and handle them in the Globals window.

    Thoughts? TIA.

  15. I wanted to try the "cluster ini file" VIs in OpenG library. So I downloaded and installed the package manager (community edition) on LV2009SP1.

    Everything seems to have gone smoothly, the packages are downloaded and installed inside LVPM, connection with LabVIEW has been checked and is OK.

    But when I open LabVIEW, there is an entry OpenG in the Tools VI palette. Therein only an empty grey rectangle appears. No VIs.

    Any ideas?

    TIA.

  16. You can be miffed all you like, but it's actually *exactly* how it works with all "normal" varaibles - when you pass something on a wire into a subvi through its' connector pane you're passing the value of the data on the wire, not a reference to something that was the source of the wire.

    crelf, I disagree with your statement. When I wire a variable to a Sub-VI, upon entry into the Sub-VI the placeholder control that was on the Sub-VI front panel assumes the value of the incoming wire. So if I wire a graph I expected EVERYTHING from the graph to be transferred as well. Now I know that only the DATA are passed to the Sub-VI. IMHO this breaks the concept of passing an object.

  17. Thanks very much ShaunR.

    It actually occurred to me to try a reference, but when I quickly tried it, it didn't work (I didn't know how to create the correct property node).

    Now I found the example where this is shown and it works perfectly.

    This was my first post here and I am impressed by the helpfulness and quality of this forum rolleyes.gifthumbup1.gif

  18. Hello,

    I could not find an answer to this (I tried a search).

    I have a main VI with an IntensityGraph with cursors. I want to read and change the positions of the cursors (among other things) in a Sub-VI. The reason for doing that is that the block diagram is already huge and very complicated, so I want to move some of the tasks to a Sub-VI.

    So I wire the IntensityGraph to one terminal of the Sub-VI connector. But when I read the cursor position with a Property Node inside the Sub-VI, I get the cursor positions of the "fake" IntensityGraph that I put in the FrontPanel of the Sub-VI, NOT the the cursor positions of the original graph in the main panel that I wired to the connector of the Su-VI.

    I hope I made myself clear.

    I am miffed by this behavior, which is not how all other "normal" variables behave when you pass them to a Sub-VI.

    My workaround now is to extract the cursors' positions in the main VI and pass those in a cluster to the Sub-VI.

    Is there a way to do it?

    Thanks.

×
×
  • Create New...

Important Information

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