Jump to content

Khalid

Members
  • Posts

    160
  • Joined

  • Last visited

Posts posted by Khalid

  1. If you're already got your left hand on the Ctrl key (which I almost always do when programming in LabVIEW), it's pretty quick to do Ctrl-E -> Ctrl-W. That's the procedure I usually do when wanting to close a VI while viewing its diagram.

    -D

    Thanks Darren. I try doing that.. but lately with LV8.x, and when I have a bunch of VIs open, the Ctrl+E takes a while to bring up the panel window and display it -- all this effort only to close the VI.

    -Khalid

  2. Most of the time I have block-diagrams up and front-panels minimized. But when it comes time to close the VIs I have to switch to the front-panels and close them.

    It will be nice to be able to close a VI by closing its block-diagram. It could be made conditional like "close VI only while holding down control key". So Ctrl + a click on the "x" of the block-diagram window would close the VI.

    Thanks,

    -Khalid

  3. Hello,

    In my application, I have two xy graphs, one for the North and the other for the South. So depending on what the user input is (N or S), I want to plot the information on the correspondent graph. I used Match True/False string to capture the user input, then use a Case structure to pass my information to the correspondent graph. I does not work. Please see my attached VI and help!!!

    A cursory look at your VI tells me that the Case Structure has the same outputs in both the cases. That would not work.

    -Khalid

  4. Hello all,

    I would like to have my application generate some sort of windows event that will stop the screensaver from starting up. I have tried generating mouse movements but this does not seems to work. Any ideas?

    You can programmatically disable the Screen Saver by calling the SystemParametersInfoA function from the User32.dll. Look this function up on MSDN.

    post-311-1159975498.png?width=400

    Note all parameters are of type U8.

    Regards,

    -Khalid

  5. thank u for all member

    i kwno lookout program

    but i hope make SCADA system by using LV

    LO: iam useing LO and connect with Omrpn PLC

    but i can't connect with Delta PLC

    If you are already using Lookout for your SCADA system, then why do you want to switch to LabVIEW? As you know, Lookout has better support for SCADA (RTU drivers, modem support, built-in alarms, etc.).

    As for not being able to connect to Delta PLC in Lookout, you may want to post your question on NI's Lookout forum: http://forums.ni.com/ni/board?board.id=190

    Regards,

    -Khalid

    PS: Others, no flames please -- LabVIEW is all powerful, and I love it too, but Lookout is tailor-made for SCADA.

  6. Hi readers. First off, I'd like to thank all who read and offer advice...Us new LabVIEW programmers really appreciate the "application specific" advice.

    I'm writing test-stand control system for an automotive (Powertrain) test bench. I have to manage the User Interface, 3 CAN networks (1 Read, Act on data, Display. Write and LOG, the other two READ, Display, and Log time-synchronized with the 1 CAN network. Additionally, approximately 60 analog channels will be synchronously logged as well.

    All logging will be via TDMs in LV8.20.

    All together, I have to read/display/log ~150 CAN signals at 10-100Hz (User Selectable). The CAN channel I'm acting on, which simulates the Vehicle Processor, must have data written at 10ms intervals, or the subnet processors will fault.

    To facilitate TDM properties, each CAN signal and analog channel will have ~5 properties associated with it.

    I'm struggling with how to structure the data coming off the CAN network. I'm thinking a cluster of clusters, or possibly an array of clusters. But I'm not sure how big that would get...We'll be running RT. I'd likely take this cluster and make it a SHARED VARIABLE for improved coding...and memory management

    Any guidance would be GREATLY appreciated. I can "struggle" through the implementation code, as long as I'm comfortable I'm solid with the underlying data structure. :headbang:

    For what its worth, I'm planning to have the application Event Driven as much as possible...

    Thanks again

    As for the data structure, I have the following suggestions: Not knowing the actual data format and what other processes you will have going, the following may not suit your case. If you have a fixed number of channels, I suggest you use an array of clusters in your processes. The actual cluster will be your data structure, typically with one DBL for value, another for Timestamp, and a U8 for status code, and another one for Channel ID, for example. You can add/delete to this if you see a need.

    The reason I suggest having an array of this data-cluster is, in your different processes you can, first, initialize this array to the size of the number of channels, and then as and when you get new channel-values, you just index and replace that element of the array. This way you are not using build-arrays, etc. in a loop.

    To pass the values around, I suggest you try the new RT-FIFO functions. In 8.20 they now support clusters. So, whenever you receive a new value for a channel, you would stuff this clusters with all the data, timestamp, status, and the channel ID, and place it on the FIFOs. The different processes can read the FIFOs (you will need one FIFO per process) and take this cluster-data and replace it in the array.

    Hope this gives you some ideas.

    Regards,

    -Khalid

  7. Though I like the simplicity of Serial in general, I would recommend TCP/IP in this situation. It should not be very difficult in VB to send similar commands over TCP. And on your LabVIEW side, you would have a simple TCP Client (single connection listener). You could even modify the shipping examples to suit this for your application. The rest of the code for parsing and interpreting the cycle counts need not have to change.

    The advantages of TCP are obvious: can have multiple computers (or applications within a single computer) read the counts, distance is not an issue, and can even go wireless in the future.

    My 2 Canadian cents.

    -Khalid

  8. Here's an interesting blog -- programming gurus of our time (Linus Torvalds, Bjarne Stroustrup, James Gosling, et. al.) were asked a few questions, and they responded:

    http://sztywny.titaniumhosting.com/2006/07...ammers-answers/

    Some questions that were asked:

    - How did you learn programming?

    - What do you think is the most important skill every programmer should posses?

    - Do you think mathematics and/or physics are an important skill for a programmer? Why?

  9. The 'Refresh' button on the 'Show Buffer Allocations' window doesn't refresh the allocations (black squares) after the VI is modified. The Context help for the Refresh button says: "Click the Refresh button to recompile the VI and display the black squares."

    Reported to NI; CAR# 40N8DISQ.

    Workaround: Do a Ctrl+Shift+Click_the_Run_Arrow to recompile the VI.

  10. I'll second that. Good code includes consistency but, as noted in another thread, consistency of this nature is not something to enforce across the industry. Maybe some ini setting exists to change the color? :rolleyes:

    Speaking of color changes, I really like how 8.20 has error wires a different color than any other random cluster.

    I third that :P

    It's quite annoying actually. My diagrams now look like they have yellow bandaids all over the place!

    -Khalid

  11. jimi,

    I read that array to determine the order and identity of 5 hardware data acquisition boxes via USB. I do this every few seconds. If I can read the array at will, I can handle the rest.

    Fred

    Is there an initialization stage where the user enters these device IDs, and then from then on you check this array (which implies the user can't change it now)? Or, you would like to check the array all the time, even while the user is entering the device IDs?

    The devil is indeed in the details.

    -Khalid

×
×
  • Create New...

Important Information

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