Jump to content

merlin

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

merlin's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, i have changed the position of the question (whether one wants to _really_ exit) so that it doesn't interrupt the statemachine. i am including a zip file with the vis this far. Thanks for the advice and a happy new year. merlin Download File:post-1543-1136301974.zip
  2. Hi Wmassey, first i would like to thank you for the example file. Very useful. I still have a problem: When the user clicks on the abort-button (or types Ctrl-[dot]), there is no question of wether he wants "really" to exit.. Doesn't that fire an event? I think i understood the strategy of deleting the queue and thereby declaring that the vi has to be closed. Nice. thnx. merlin.
  3. I have yet another question: I'm trying to avoid the vi from stopping before i deinit all open io-sockets and write every ini-file and so on. To achieve that i created an "EXIT"-state, which should be queued, when the event "Application Exit?" is triggered. Though i linked "Discard?" to "False", the program is still stopping before "asking my permission". Could someone help please? merlin PS: Nevermind that you can't see the stop sign or that the subvi (which closes the sockets) hasn't got a nice icon, i'm still justing "testing".
  4. timers, but the timer frequency could change. no could you please explain? Or link to some ressource?? I don't think this is possible, since the timer needs to be running all the time, even if another state is running. can i make a timeout to such an operation? I need this so i can check for "hanging" hardware (or software for that matter). The interface consists of two or three graphs (!) and some controls (for pid-controller) and perhaps some numeric indicators. Thanks man. now at least i can start coding. cya. merlin
  5. Hello everybody, i am still trying to rap my head around the idea of the state machine. My problem consists in that my "states" are neither sequential nor do they (normally) "know" what other state should follow them. would you please look over my structure "plan" and tell me especially if it's ok to (ab)use queues for determining the "next" state of the state machine in this way?? The small subvis at the bottom should set a queue item with a defined name, so that "DECIDE" can decide which state to go into next. Since the frequency with which DECIDE is executed is much higher than the frequency of the other states (100ms, 200ms, 500ms and 1s) this should ensure, that there isn't much delay between Queue setting and execution of desired state. In general i could use user events instead of queue and in that case i won't need DECIDE to run every x ms. By the way, what about the interface in this scenario, should each control handle the interface or is it wiser to let one extra state update the whole interface? Another question: what is better in this case using shift registers or LV2-Global variables to transport the variables (IO-acquired and to-write Data) between states?? And please do ask, if the grafic or the text isn't comprehendable. cya and thnx. merlin
  6. Hi, As you noticed my main problem is that READ - CONTROL and WRITE have to run completely independent. So i need all the data (both input and output) to be "global". I am still looking into that LV2-globals and i found these two pages about it: A small explanation: http://www.icon-tech.com.au/faq_blockdiagram.html#LV2Globals A small example: http://physics.wku.edu/phys318/notes/n07.html In the example-page i find: Nevertheless, even if this is out to debate, i like the LV2-method because apparently i don't need any sznchroniyation (i.e. samphores..).But do i really have to build an LV2-global for each variable i need? Since some variables have to be read/written at the same time, is it "ok" to change the lv2-structure to something like this: ? I think i understand what a statemachine is, but i don't know where i should be using it in my special case. Mind you the iterations of READ, WRITE and CONTROL aren't the same iterations. I only got LV7.0, so i can't look into this file. Thank you very much. At least the LV2-globals will help me. If you got any more tips, please don't spare me. cya. merlin
  7. Hi, i really don't know, if this can be understood as "Large Application", so i'm sorry, if not. I'm working together with another student on a control application. Each one of us has to control some signals. Both projects could run independently but we have to integrate them. What i've done so far: the io-parameters are stored as globals (so first question would be: is that the most wise thing to do?), inside the main-vi there should be at least four sub-vis running simultaniously: INPUT, OUTPUT, FORCE-Control (my part) and SPEED-Control (his part). My second question is concerning handling the interface: FIRST OPTION: Each Control (FORCE and SPEED) has it's own interface that covers half of the monitor. This way they are integrated within Subpanels. I should mention, that the user should be able to switch from automatic-control to manual control (for both controls). This would mean, that everyone of us, has to make two different sub-vis (auto and manual). SECOND OPTION: We build one vi, that controls all of the interface, but it has to rely on (again) global variables, that are being passed by each of our controls. That means, that the interface is being set every x msecs. I hope, that i made clear what the problem is and also hope, that some of you could give me some hints.. cya and thnx. merlin
  8. Hi, as the title says, i am thinking of using an svg-file as a front-end-solution to labview. Svg ist scalable verctor grafix. It renders very fast and is easy to script. I need two things. Mainly i would need labview to integrate the svg-file as an activex-component. Adobe provides an activex-object, but it doesn't seem to work with labview. In the second stage i'd like to access the dom-objects inside the svg-document. Or at least i would like to start some function inside svg.. Has anyone any experience with this kind of connection between labview and svg? Thnx in advance. merlin PS: svg: http://www.w3.org/Graphics/SVG/
  9. Hi, thank you, that seems to be exactly what i need. Problem is still, that i'm not able to read the pictures, but i hope this will sort itself out. thnx again. merlin
  10. not static images. I need to change them. explanation: i built a function, that would draw a list of items onto an image and select one of them. Select means, that it would put a box around the item with a background and change the item's color. So to that function i pass a background image, the items (as a array of strings) and the colors. The function returns the new image (possibly the list has to be displaced, so that the selected item is still visible...). So everytime the user presses arrowdown for example i would pass a pos+1 to the function and the next item will be selected. Then i route the output image to a picture-control. As i said before, the picture is 600x256px big. The first time the picture is loaded it needs about a second or two to load. After that it's much faster but still not fast enough. When you go down in a listing, you wouldn't expect to see the picture flash... Please tell me, if that's still not clear. thnx.
  11. Hello Everyone. In my vi-application, i am using some images, that are loaded using "load jpg"/"load png"-functions. Now everytime i load an image, this takes too much time (for my needings; pictures are 600x256px big.) It gets even slower, when i write to the picture-control using the reference (from inside a subvi). I was thinking about storing the images in the final exe. Is that possible? And how would i go about to load the pictures then? thnx in advance.
  12. Hi first and thnx. i am actually using the vis that come with the CanCardX Driver Library. Actually i found an update version on the vector-site (for free): http://www.vector-cantech.com/index.html?....ndriverlib.html Right now, i'm having the carcardx being polled every cycle. The problem i think is known: this way i eventually miss a message or my laptop dies of cpu-ageage. I'm thinking of transfering the whole thing to visual basic, there is a sample visual basic source in the driver library, that explains how to set up events for the cancard. Another thing: At this time i do use the cancardx with two applications: labview is polling for new events and at the same time canoe is doing a rest-bus-simulation in the background - on the same channel.
  13. Hi everyone i am new to labview. Trying to program a vi to receive and transmit CAN-messages with vector's CANcardX [1]. I need a structure like the c++-type of WaitforsingleObject(...). How can i do this with labview and is it then possible to set a number of such WaitForSingleObjects()?? Or could someone who has allready used the cancardx with labview point me to some info in that matter (other than the sample-vi)? Thanks in advance. [1]: http://www.vector-cantech.com/index.html?....ndriverlib.html
×
×
  • Create New...

Important Information

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