Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by jgcode

  1. QUOTE (NewUser @ Nov 6 2008, 11:11 AM)

    if i use my current configuration and try to attach the summation thing, it says i've connected terminals of two different types??

    You are passing in a scalar value, but it requires an array (multiple scalar values).

    Either add to the scalar value using the shift register in the loop to get the sum (your example)

    Or get the sum of the array of elements using auto-indexing outside of the loop (as per example).

  2. QUOTE (Randy @ Nov 6 2008, 12:46 AM)

    I'm looking at implementing a system that publishes a vi through the labview web server for remote access/control. I'd like to be able to view this webpage on a PDA/Windows CE device and was wondering if there is a runtime deployment for Windows CE that would allow this kind of remote panel type setup since I've needed to install runtime on PC based machines with a similar setup. I'm operating with LV8.6 on the system acting as a web server.

    Thanks

    About 3-6 months ago I inquired to NI Support about Remote Panels running on a Windows CE Touch Screen (specifically TPC-2012) [LV8.5.1].

    The response was that Remote Panel is not supported on that OS - something to do with the browser I think.

    I will see if I can find the exact response in my work inbox if I still have it.

    So the last I heard a method like this won't work - we had to implement a custom solution (VI).

  3. QUOTE (vronto31 @ Nov 3 2008, 04:01 PM)

    I implemented redundant comms for dual-NOEs on a PLC network with cFP using modbus.

    Around that time I was searching the topic of redundancy for cFP and found a bunch of KB's on NI website

    Check here, here and here for a start

    I have been using the cFP-2220 lately which have the dual-ethernet.

    More so for a private network than redundancy. I really like these units (they have a meater processor, usb, dual ethernet).

    I was told by an NI FSE that the first dual-ethernet cFP were custom designed for a large job that required network redundancy on a single controller.

    Anyways, the KB you are referencing is actually using a "dumb" gate-way type setup where there are no controllers on those other chassis'.

    They are daisy chained to expand the IO off of one controller, not for redundancy.

    But you should be able to setup redundancy in a similar manner - just a note that you have to run the secondary port off a different subnet to the primary.

  4. QUOTE (BobHamburger @ Oct 29 2008, 11:23 AM)

    What do the previous posters mean? They're ridiculing you. Why? Because it's obvious that the problem you posted is a school assignment, and you are trying to get other people to solve the problem for you. That's called cheating. On this forum, posters like this are called Homework Hustlers (HH for short), and this is strongly frowned upon.

    I disagree with ridicule

    Some helpful points were posted initially....

    Then via an uncontrollable act of nature the topic was taken over..

    ...a little fun on the topic rather than at the user methinks.

  5. QUOTE (jlokanis @ Sep 21 2007, 05:37 AM)

    I put the ideas in the thread to use and made an example of a transparent background splash screen that fades in and then stays visible while a startup process completes. Take a look at the attached VIs to see how this is done. You can replace the graphic with your own to customize this example.

    Be sure to use the PNG format for your graphic. I recommend Paint.NET as a good free editor for creating PNGs. The one in this example was built by lifting a graphic off NI's website.

    Hope you find this useful.

    -John

    John, keep rolling out the magic :thumbup:

    Beautiful!

  6. QUOTE (Thang Nguyen @ Oct 28 2008, 11:11 PM)

    Hi Thang

    If you are just going VI to VI all you need is for vi B to run a FGV that accesses the queue for vi A and queues method(s) into it (Queue Manager).

    Therefore this approach may be the easiest also if you require high speed updates.

    In fact if vi A did all the processing and vi B was just displaying a point(s) on the map you could queue directly into a display loop (if you have one).

    I use the above when I know exactly:

    1. Who/where I want to send the data to and

    2. I know 100% that this vi is in memory.

    3. For within VI loop-to-loop messaging.

    But when I don't know, I use use events.

    IMHO events are the king at doing this, so what you are doing is great however, an event manager might help with flexibility and scalability in the future:

    I do the above in most medium size apps that have a GUI.

    I have a main template that stays in memory all the time.

    It hosts the RTM, toolbar, status bar and a subpanel.

    Dynamic VIs are loaded into a subpanel (serially loaded) that go in and out of memory.

    I also have other screens that can be loaded at any time (e.g. setup screens, data screens) that are generic where any Dynamic VI may want to call them in parallel.

    I prefer to have these other screens not to be dynamic and are in memory with the template at all times (I just show/hide FP).

    But the below will work the same.

    About me:

    I prefer events to polling.

    I like to think of a screen as an object.

    I use type-def enums a lot.

    I like polymorphic VIs

    This is how I have implemented communication.

    I call it publisher/subscriber cause that is the easiest way to describe it - but you can call it want you want :)

    When the user changes data on a screen (e.g. selects a plot color in settings-type screen) I need to notify every other VI that is using that object data that it needs to update.

    To not do this via events and use polling is inefficient IMO

    Also as in this example a plot color change would cause a graph to have to update (which is expensive) I want to know exactly when this happens.

    In order to pass data to and from VIs I create a MFVI\Module that handles all events registering.

    The event is dynamically registered to all VI's GUI loop.

    So all VIs can potentially receive each notification however, you have to statically set which ones it is allowed in the event structure.

    This method is easy, flexible and scalable. I do not have to know what is in memory (e.g. by loading to a specific queue(s) manager etc.. - is the queue is memory is it not?).

    So when you have 10-20+ VI's with screens this is great.

    post-10325-1225232358.png?width=400

    In the figure above - vi B is subscribed to an event from vi A

    The data passed is an enum. Which means the setup can publish an infinite number of messages.

    In this case there is only one message in the enum, but use the NewVal input wired to a case structure so you can choose which published messages to listen to and then load different local methods.

    Once vi B receives the message in it's GUI loop it loads its own state in a parallel main (working) loop (by using a Queue Manager via a FGV approach for loop-to-loop messaging)

    This state accesses vi A's object data, & vi B then updates its local temp data and runs any local methods it needs (e.g. update plot colors) [not shown]

    post-10325-1225232378.png?width=400

    The biggest reason for me going this way was:

    1. To share the RTM, button toolbar with all VIs from the template VI.

    2. Communicating with screens in parallel - the user can potentially have open the main app, setup screen, admin setup screen, calibration screen, plot-manager-for-graph screen etc.. at the same time.

    So as soon as one screen is changed that another screen is dependent on and its in open (but you con't need to care either way), the dependent one updates immediately.

    A more efficient way for the above method that I have taken from the release of the JKI state machine (thank you) is to include the UI Structure in EVERY main loop.

    As having the GUI receive a message then load a state in parallel to a main loop I have recently come to see as it a bit of a wasted two-step process.

    Also any QSM's running in the background headless can receive notifications without needing to have a GUI loop in parallel.

    But i have not implemented this yet into my template.

    Check out the JKI SM which uses strings and and an event structure here

  7. QUOTE (labviewRTS @ Oct 19 2008, 11:52 PM)

    does VISA library work on RS-232? By the way,do you know how to design a cluster with strict typedef? I got Bank.Vi with me where i use Rendezvous, Semaphore and race condition. This is from the labview Basic II course which they ask us to modify a Bank.vi. Through the design, i have no clue on how am i going to put into a serial communication through VISA.

    Haha=).. i am seating for my CLAD papers soon. So I need to get myself familar with all the basic stuffs..

    Anyway, if you were a developer, how are you going to implement this projects? Mind to give me some hints on your state machine or input/output implementation? Sorry for troublesome you. But any help on that will be much appreciated.

    Yes VISA works for RS232.

    To design a strict type def right click on a control and select customise.

    This will open up the edit screen.

    Toggle the drop box under the run-time-menu from control to type def OR strict type def.

    Exit and save the .ctl file. Now you have a type def.

    If I was going to develop this project, and this is quickly and off the top of my head. I would design it to run locally first for debugging (keeping in mind parts which will have to be come distributed).

    Once I knew all my logic was good and it work. I would create proxy's for the modules that need to communicate over serial - so serial comms is transparent to the modules that don't need to know about it.

    You may want to look at using templates (.vit) so you can have 4 (or whatever) ATM's running from the same piece of code that can be spawned at run-time.

  8. QUOTE (Michael_Aivaliotis @ Oct 19 2008, 03:34 PM)

    Well, this makes sense to me. Behavior is expected. I'm sure if you turn "defer panel updates" off then it should auto-scale again.

    Sorry guys

    Thanks for replying, my question was incomplete - it has been edited for correct grammer.

    I turn Defer Panel Updates to False but I didn't get an auto scale.

  9. QUOTE (labviewRTS @ Oct 19 2008, 10:54 AM)

    Based on the above question.

    I just want to know the implementation for it. I know how to design the ATM. But i have no idea how to put my design into serial link?Please guide me the implementation or give me some hints. Thank you[/size]

    HH but nonetheless:

    Hi labviewRTS if serial comms is your issue ?? I recommend investigating NI VISA found on the Instrument IO>>VISA palette.

    It is really easy to use - like other OOPy modules (e.g. File IO) create a VISA reference (set port config here), do methods: VISA read/write/other, close VISA reference.

    You can also access properties-such as read bytes at port through nodes too.

    I recommend searching the Example Finder as there is a basic read/write there that is handy to get started.

    Instead of accessing a local file to verify transactions and get data, you just need a proxy to the Bank.

    Sounds like a cool project.

    Reminds me of an exam I once took.... :shifty:

    Goodluck

    JG

  10. QUOTE (Aaron L @ Oct 18 2008, 05:21 AM)

    Christian,

    Thank you for the idea! Unfortunately I didn't forsee this issue when I first began development. I believe I can see a way to do such a thing, now that you mention it.

    However, I have the pleasure of answering my own question as well. In the Build Menu, select Properties->Source file settings->Customize VI properties button -> Execution selection - > uncheck Run when opened. Hopefully this will help someone in the future.

    This will open the application but not begin running it. It's not the prefered method, but it achieves my current goals. I'll develop with a better LV methodology in the future, thanks!

    Hi Aaron

    I had the same problem when I started coding and made my first exe.

    In code, I would type in all my values then press the LabVIEW run button, run the code and get my answer.

    As a compiled exe, it would start straight away and would ruin everything.

    So I am guessing the following may help (as it helped me)

    This was until I learned about the Event Structure (and design patterns).

    Building a UI into an application as FPGA suggested is far more productive then stopping the VI from running at startup.

    Do a little search on Producer Consumer (Events) to see how a UI event will trigger state(s) to run in a working (main) loop.

    Now the application will be running - but you (or the user) controls the execution of events, and does so expending minimal CPU resources.

    Once you get this powerful design pattern, it will really accelerate your development.

  11. QUOTE (PaulG. @ Oct 17 2008, 10:23 AM)

    ForCryinOutLoud! WTH are we doing here, guys? It's LabVIEW, not "labview". And if KM4HR wants to "protect" precious intellectual property ... :o ... just tell him/her to save their code onto their own personal thumbdrive.

    What are we doing here?? And why do I keep coming here?? :blink:

    Now that's one way to stop the growth and decrease the reputation of an open forum such as LAVA:

    Telling people they aren't good enough to be given a correct answer to a legitimate question, even after that person explicitly said they are a newbie and have thanked previous posters for their constructive comments.

    Way to go!

    <edit>

    I actually do not have a problem with people having an opinion like the above - as everyone is entitled to one.

    I just see how it was helpful to the issue at hand (or the community as a whole) in any way, shape or form, to actually go ahead and post it.

    </edit>

×
×
  • Create New...

Important Information

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