Jump to content

JKSH

Members
  • Posts

    494
  • Joined

  • Last visited

  • Days Won

    36

Posts posted by JKSH

  1. There is no such thing as "properly" in management - only working or not.

    It takes this long, costs this amount of money, period! (because you never guess or estimate, you always calculate to ensure the project is on-time and on-budget, right? :P ) If you are pressured, you supply a list of features and ask them to cross off the ones they don't really need or want and you will recalculate. Alternatively, they can give you a deadline and you will supply them with the features that can be achieved within it.

     

    You want the reputation that your first plan is considered, calculated, already optimized and accurate for an on-time and on-budget delivery and there is no point in questioning it if they need everything you have listed.

     

    Mm, you're right. Requirements prioritisation and firm, systematic management is the way to go.

     

    I've been spoilt -- our manager used to do the same work as so he defers to us for timeline estimates calculations, and most of our customers have been reasonable with their expectations :D

  2. I inherited this problem from a long line of "Hey can you add this to it...." so the code reflects the I have to have it yesterday mentality.

     

    Sometimes, users ask for things without fully understanding the complexity involved.

     

    If you're asked, "Hey can you add this to it..." you can reply, "Yes, and it will take X days and/or Y dollars to do it properly". If they pressure you to do it faster/cheaper, you need to make a judgement call -- should you should do as they asked, or should you try to change their mind? If it's not truly urgent, you could explain that shortcuts will jeopardize the quality of the code and make it harder to make improvements in the future.

     

     

    I've been hacking out a lot of really bad code to get it stable, as far as refactoring, I could use some help on that. I'm trying to get it running right and then go from there. There were quite a few areas where it looks like something was started and then in mid flight they disabled it????

     

    Cleaning up your code could make it easier to get it stable, simply because the code becomes easier for you to follow. The easiest starting point it to identify and delete code that doesn't do anything useful. I would get rid of those disabled/abandoned bits.

     

    Another example: The pink wire at the bottom of the DAQ loop is unused and should be deleted.

     

     

    Alright, what do I need to do so you have it modular, scalable, reusable, and extensible?

     

    Here's a starting point:

    • Better Separation of Concerns. One component should focus on doing only one thing, and other components should not share its job. This makes it easier to reuse the component in other projects. It also makes it easier to identify where a change needs to be made when updating the code. For example, the DAQ loop should indeed be in charge of doing DAQ, but it shouldn't be responsible for reading/writing settings files.

     

    • Avoid duplicating code. For example, in the DAQ loop, "Safe Stop" and "Timed Safe Stop" have exactly the same logic. See if you can find a way to merge them.

     

    • More comments within the code, to describe what's going on. What do the various boolean wires mean?

     

     

    Any Idea why at the last cycle the output is 0.120007sec and the "time has elapsed" true false out is held true till the next cycle starts?

     

    I'm not sure what you're asking, and I can't run your code. I recommend creating a new VI, put an Elapsed Time express VI in a loop, and experimenting with its inputs and outputs. See post #4 (Hooovah posted some sample code). Reading http://zone.ni.com/reference/en-XX/help/371361M-01/lvexpress/elapsed_time/ could help too.

  3. On RT there is no front panel, so getting references to those controls isn't possible.

     

    I don't suppose you have access to one of the shiny new Linux RT cRIOs that have a mini-DisplayPort for built-in GUIs? (cRIO-9030) I wonder if that works.

     

    I've built a program for a cRIO-9030 which uses control/indicator property nodes and an event structure, so that means the references exist there. The cRIO is now with the customer though, so I can't experiment with it anymore.

  4. I was thinking about adding code to check where the page the pointer is in and its access permissions. Its extra overhead and training wheels so I don't know how I feel about it. Maybe a global flag in a list of options so it's only a jump if you don't want to perform the check.

     

    Perhaps you could let the user toggle between Debug mode and Release mode? Debug mode performs checks and flashes big angry warnings if a violation is found; Release mode assumes that the developer has already combed through their code using Debug mode, so it skips the checks.

    • Like 1
  5. I haven't worked with LabPython. From the release information here it indicates that LabPython was tested with Python v2.5. Don't know if that makes a difference.

     

    I haven't used LabPython before either, but I do know that Python 2.x is not compatible with Python 3.x.

     

     

    Debugging Windows informs me that it "Couldn't load symbol _Py_ZeroStruct". 

     

    I'm guessing that the function called "_Py_ZeroStruct()" exists in the Python 2.x DLL, but not the Python 3.x DLL.

     

    Try installing Python 2 instead.

  6. If you want an off-the-shelf product, you'll need to find one that understands the raw records.

     

    What format is your records stored in?

     

    I've done one TestStand project, and my client was happy to use TestStand's built-in reporting functionality. We configured the station such that each test produces an ATML file for easy viewing, and also inserts the data directly into a Microsoft SQL Server database for easy querying and processing.

  7. Interesting. LabVIEW 32 bit not supported. Is this the beginning on 32 bit obsolescence

     

    I'm not entirely sure what the table is trying to say. The note says "...the column titled 'Windows 10 64-bit (Using 32-bit Software)' indicates the first version of 32-bit software that will run within the... (WOW64) emulation layer", and the table says:

    1. Windows 10 64-bit (Using 64-bit Software) does not support LabVIEW 2015 32-bit
    2. Windows 10 64-bit (Using 32-bit Software) supports LabVIEW 2015 32-bit
    3. Windows 10 64-bit (Using 64-bit Software) supports LabVIEW 2015 64-bit
    4. Windows 10 64-bit (Using 32-bit Software) supports LabVIEW 2015 64-bit
     
    I take #2 and #3 to mean that 64-bit Windows 10 supports both 32- and 64-bit LabVIEW 2015.
     
    I'm guessing that #1 means you can't run 32-bit LabVIEW without WOW64.
     
    I'm guessing that #4 is a typo, since you can't run a 64-bit application in a 32-bit environment.
  8. Shared variable offer the possibility to transfer data, but doesn't allow the usage of a remote functionality...

    Completely different.

     

    Can you please clarify your goals? What you want to achieve by using remote functionality?

     

    In your original post you said "I'm trying to exchange data between two executable. The way I was using in the past was VI server.However, you don't necessarily need VI Server to exchange data.

     

    Also, you can design your programs to use shared variables for remote control. Let EXE1 can send a command to EXE2 through a shared variable. EXE2 just needs to read the command variable, and perform the action that you want.

  9. ETA: tried twice to submit it as a service request and got

    An error ocurred.
    We are unable to create your Service Request at this time. Please try again later.

     

    You'll have much better luck posting to http://forums.ni.com/ than submitting a service request.

     

    (Twice before, I tried to submit bug reports using service requests. The staff who was assigned to me started off by asking very simple questions which were already answered in my original post. Since then, I've posted all my reports to the forum, and get good outcomes)

  10. I don't see any issue like this with LV 2011 and 2015. I can alt-tab to any LV window or can alt-tab and use the mouse to click the relevant window. 

     

    Same for me, with LV 2014 SP1. Alt+Tab and clicking work fine. I can also use Ctrl+E to switch between the Front Panel and Block Diagram.

     

     

    One thing to note is that the alt-tab dialog in Windows 10 does remember the original order of the windows and doesn't bunch all of the LV windows together, like older versions used to.

     

    Hallelujah :) (Windows 8 does that too, by the way) Now if only Windows would prevent LabVIEW from bringing all of its windows up to the foreground as soon as I activate a single LV window...

  11. For anyone listening, here is how to send messages (or any other data type) via a TCP connection.  Basically, one just puts a message length at front and reads that first.   TCP handles making sure you never miss a byte, so there is no need to identify data boundaries.

     

    Clever. The key ingredient I missed was the ability to make the TCP Read node block until the specified number of bytes arrives -- this definitely simplifies things.

  12. Agree drjdpowell. I went to the trouble of figuring out to create having N instances of an executable opening a pair of network streams to remote targets, handling disconnects gracefully on both ends, and figuring out all the error codes associated with them. In hindsight I should have used the simple tcp messaging library.

    Supposedly network streams are goodn or high data throughput of one data type but how often does anyone really need that?

     

    Network streams are built on top of TCP. It provides a simpler interface than TCP for streaming data point-to-point, at the cost of losing the ability to listen for multiple connections. It's nice to be able to dump an array of doubles in one end and get the same array out the other end, without having to search for data boundaries and reinterpret bytes.

     

    We are currently developing a system that controls and monitors a pilot plant, using CompactRIOs and CompactDAQs connected to a central PC server. There are a large number of I/O points, a number of which need kHz sample rates. The cRIOs and cDAQs use network streams to transfer the waveform data to the server for logging.

     

    Also, our customer wants to allow an arbitrary number of client PCs to view the logged data. The server accepts requests from a client via raw TCP, taking advantage of the TCP Listener function. Once a request is received, the server sends a unique ID to the client to establish a network stream for transferring the waveform data.

    • Like 1
  13. My project is use the myrio and labview to control my lab equipment through internet. Now I had finished my program and able to control all my equipment using the labview run in my computer.

    How can I publish it on the internet and able to control it ?

     

    Did you pick one of the options at https://lavag.org/topic/19288-html-file/?p=116346 ?

     

    You could also buy LabSocket: https://lavag.org/topic/17164-new-release-of-labsocket-the-easy-way-to-extend-labview-to-the-web/

     

     

    I got heard one method to convert it to html file using the web publishing tool. I tried the tutorial but at the end I only saw the programming language but not the control panel that I had created.

     

    I don't quite understand what you wrote, sorry. Please give a detailed description of what you did, and post screenshots of what you saw.

  14. I also press Ctrl with my left pinkie a lot; I often do Ctrl+Shift+S to Save All in LabVIEW, and even Ctrl+Shift+Tab to navigate my web browser tabs.

     

    I avoid stretching into awkward positions whenever possible; instead of leaving my hand in the home position and stretching my fingers out to the left, I move hand and elbow freely to reach the keys comfortably. For example, when I do Ctrl+Shift+Tab, my index finger and thumb can end up above the 'W' and 'Alt' keys respectively. Instead of simply rotating my left wrist counterclockwise, I also move my elbow away from the keyboard to reduce the amount of rotation needed in my wrist.

     

    I agree with Gribo and recommend that you see a physiotherapist to assess your situation and come up with a treatment/rehab plan. They can also identify any sub-optimal movements you might be making with your wrist/hand/fingers, and teach you how to correct those.

  15. 1. When an event structure is in a while loop the while loop only iterates when the event occurs.  What is the reasoning behind this

     

    That's the defining feature of an Event Loop: The loop only iterates when there's an event to handle. When there are no events of interest, the loop sleeps to conserve CPU cycles.

     

     

    why can't a single while loop contain other code that gets polled or executed with every iteration?

     

    As drdjpowell explained, you can. Just input a loop period into the event structure's Timeout terminal. (Note: This means you won't have an Event Loop, but a hybrid event + polling loop instead.)

  16. HI @JKSH , my project is about remote lab, need to remote my laboratory equipment through internet, so my supervisor asked me to convert my completed vi program to HTML file so that I can connect and control through internet. How should I do this??

     

    You have two options:

    1. Create a LabVIEW Remote Panel: http://www.ni.com/tutorial/4791/en/http://www.ni.com/tutorial/4791/en/ , OR
    2. Set up a Windows Remote Desktop connection, to let your supervisor log into your PC: http://windows.microsoft.com/en-au/windows/connect-using-remote-desktop-connection#connect-using-remote-desktop-connection=windows-7

     

    Option #1 is more secure.

     

    Note: Option #2 doesn't use a HTML file, while Option #1 does. However, you don't convert your program into HTML. Instead, you create a HTML file to let your supervisor control your LabVIEW program through the Internet. You must still run your LabVIEW program on your local PC.

    • Like 1
  17. I'm wondering how people handle dependent custom libraries with source control please. In each case I'm assuming that each library has its own repository (in my case Git) for the development of the library itself, and each project then has it's own separate repo.

     

    Yep, one repo per library sounds good.

     

     

    1.  Take a copy of each library the project depends on and check it in to the project repository. Causes duplication but all the custom libraries needed for the build are then in one repo, with the right version.

     

    This is a valid solution. It's called "bundled libraries". It works for tiny libraries, where creating release packages (described below) might be an overkill.

     

    (I personally don't like bundled libraries because the duplication can make things messy in the long run, but it works)

     

     

    2.  Install the custom libraries to vi.lib/user.lib. There is less duplication but if someone checks out a project they now need to know to check out the dependent libraries.

     

    user.lib was designed precisely for this purpose.

     

    The fact that the project devs "need to know to check out the dependent libraries" should not be considered a disadvantage. After all, a project's dependencies should be part of the project documentation.

     
    However, the project devs should not check out the library. Instead, they should install the library -- install a stable released version, which has been nicely packaged by the library's developers. See the VI Package Manager: http://jki.net/vipm

     

     

    Plus, if different projects on the same machine depend on differnent revisions of the library it becomes more fiddly.

     

    Again, I would not make individual revisions accessible. Project devs should only be allowed to choose from the (small) set of stable releases.

     

    Furthermore, a mature library should ideally have a stable Application Programming Interface (API). Newer versions should aim to avoid changes that break compatibility with older versions. This way, you don't need to worry about juggling multiple versions -- just install the latest stable version.

     

    Exceptions to the "minimize compatibility breaks" rule are:

    • When the library is in its infancy: It's ok to play around with the API at the start, to figure out the best design. However, it's probably risky for projects to rely on an immature library anyway. (If the library is that new and it's under your control, you could develop the library as part of your project first. Then, when it matures, split it off into its own repo as a standalone library.)
    • When the library has evolved to a point where it needs to free itself from the shackles of old, deprecated functions in order to progress further, or when the burden of maintaining the old functions becomes too great. This should not be a regular occurrence (once every few years, perhaps?)
×
×
  • Create New...

Important Information

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