Adding an action to many cases in a LabVIEW case structure - case

Can you add an action to multiple cases in a LabVIEW case structure?
I have a situation where I have already created a case structure with many cases. I need to add another output tunnel, but I am stuck needing to wire each case. Is there a way to tell LabVIEW to wire all of the cases and then manually change the few that are different?

Yes there is. In recent LabVIEW version (>2011 I think), you can create a 'Linked input tunnel', to do so create a left-to-right wire in one case, right click the the right-hand terminal, and select 'Linked Input Tunnel->Create & Wire Unwired Cases'. This will add the wire to all the cases and to new cases you add later:

Related

Vulkan: trouble understanding cycling of framebuffers

In Vulkan,
A semaphore(A) and a fence(X) can be passed to vkAcquireNextImageKHR. That semaphore(A) is subsequently passed to vkQueueSubmit, to wait until the image is released by the Presentation Engine (PE). A fence(Y) can also be passed to vkQueueSubmit. Client code can check when the submission has completed by checking fence(Y).
When fence(Y) signals, this means the PE can display the image.
My question:
How do I know when the PE has finished using the image after a call to vkQueuePresentKHR? To me, it doesn't seem that it would be by checking fence(X), because that is for client code to know when the image can be written to by vkQueueSubmit, isn't it? After the image is sent to vkQueueSubmit, it seems the usefulness of fence(X) is done. Or, can the same fence(X) be used to query the image availability after the call to vkQueuePresentKHR?
I don't know when the image is available again after a call to vkQueuePresentKHR, without having to call vkAcquireNextImageKHR.
The reason this is causing trouble for me is that in an asynchronous, 60fps, triple buffered app (throwaway learning code), things get out of wack like this:
Send an initial framebuffer to the PE. This framebuffer is now unavailable for 16 milliseconds.
Within the 16ms, acquire a second image/framebuffer, submit commands, but don't present.
Do the same as #2, for a third image. We submit it before 16ms.
16ms have gone by, so we vkQueuePresentKHR the second image.
Now, if I call vkAcquireNextImageKHR, the whole thing can fail if image #1 is not yet done being used, because I have acquired three images at this point.
How to know if image #1 is available again without calling vkAcquireNextImageKHR?
How do I know when the PE has finished using the image after a call to vkQueuePresentKHR?
You usually do not need to know.
Either you need to acquire a new VkImage, or you don't. Whether PE has finished or not does not even enter that decision.
Only reason wanting to know is if you want to measure presentation times. There's a special extension for that: VK_GOOGLE_display_timing.
After the image is sent to vkQueueSubmit, it seems the usefulness of fence(X) is done.
Well, you can reuse the fence. But the Implementation has stopped using it as soon as it was signaled and won't be changing its state anymore to anything, if that's what you are asking (and so you are free to vkDestroy it or do other things with it).
I don't know when the image is available again after a call to vkQueuePresentKHR, without having to call vkAcquireNextImageKHR.
Hopefully I cover it below, but I am not precisely sure what the problem here is. I don't know how to eat a soup without a spoon neither. Simply use a spoon— I mean vkAcquireNextImageKHR.
Now, if I call vkAcquireNextImageKHR, the whole thing can fail if image #1 >is not yet done being used, because I have acquired 3 images at this point.
How to know if image #1 is available again without calling >vkAcquireNextImageKHR?
How is it any different than image #1 and #2?
Yes, you may have already acquired all the images the swapchain has to offer, or the PE is "not ready" to give away an image even if it has two.
In the first case the spec advises against calling vkAcquireNextImageKHR with timeout of UINT64_MAX. It is a simple matter of counting the successful vkAcquireNextImageKHR calls vs the vkQueuePresentKHRs. One way may be to simply do one vkAcquireNextImageKHR and then do one vkQueuePresentKHR.
In the second case you can simply call vkAcquireNextImageKHR and you will eventually get the image.
In order to use a swapchain image, You need to acquire it. After that the actual availability of the image for rendering purposes is signaled by the semaphore (A) or the fence (X). You can either use the semaphore (X) during the submission as a wait semaphore or wait on the CPU for the fence (X) and submit after that. For performance reasons the semaphore is a preferred way.
Now when You present an image, You give it back to the Presentation Engine. From now on You cannot use that image for whatever purposes. There is no way to check when that image is available again for You so You can render into it again. You cannot do that. If You want to render into a swapchain image again, You need to acquire another image. And during this operation You once again provide a semaphore or a fence (probably different than those provided when You previously acquired a swapchain image). There is no other way to check when an image is again available than through calling the vkAcquireNextImageKHR() function.
And when You want to implement triple-buffering, You should just select appropriate presentation mode (mailbox mode is the closest match). You shouldn't wait for a specific time before You present an image. You just should present it when You are done rendering into it. Your synchronization should be entirely based on acquire, present commands and semaphores or fences provided during these operations and during submission. Appropriate present mode should do the rest. Detailed explanation of different present modes is available in Intel's tutorial.

multinote instruments and chords

I am new in ableton live software. I would like to understand why for some instruments I can play several notes at the same time (and create chord progression) and for the others I can hear only one note of a chord.
For example, there are two guitars: 'Power Chords Guitar' and 'Please Rise For Jimi Guitar'. Both of them are basing on an operator. For the first one I am able to press several buttons on midi keyboard and hear a sound, for the second I can hear only one note of a chord.
I was trying to compare operator options, but I was unable to find the setting which causes this multinote/mononote functionality.
Thank you very much for your help.
J
Ableton's Operator consists of 4 monophonic oscillators. Depending on a preset, it can be setup to play polyphony. It seems that the Glide function is responsible for that effect. Make sure you have at least 2 oscillators (the more the more poly) with Glide "on" set.
Check out Ableton's webpage for reference on how to use its instruments.

Kicad re-arrange schema for one layer PCB

I created a simple schema on kicad (this one )
. Then I associated the corresponding footprint, generated the netlist file, then run pcbnew to create the PCB. But then I ended up with this mess and I don't know how to deal with it (I did draw the edge of the PCB ).
I am trying to draw a PCB that I can build myself with no crazy tool (so I guess single layer), but on this draw many line intersect with other line so not really what I was looking for a single layer PCB. Not sure it will help but all my kicad file are there kicad_file
The lines that you see are the connecting lines. In Diptrace it is called "ratlines". They obviously indicate where the connection is based on your schematic. Now on Diptrace there is an "AutoRoute" tool which will create routes (traces) based on the ratlines and it will try to do so a well as possible. I usually do the AUtoroute and if I am not happy with the result I do manual routing.
So I suggest you look for such a tool in your application. If it does not exist then don't be shy to create them yourself. Your PCB is not complicated so I am sure you will manage.
One thing to keep in mind though; If you find that traces will still intersect then there are two things you can do:
Use the space between the pins of the IC
Place pads where you can solder jumper wires.
Look at https://www.wayneandlayne.com/blog/2013/02/27/kicad-tutorial-using-the-autorouter/ for a post on autorouting

Sensors and webpages

I wonder if you wonderful people can point me in the right direction??
I'm quite new to web programming, I'm OK at conventional C/C++ etc but just really getting into the whole webside thang. Anyway, I was wondering how I may solve the following.
I want to have a sensor (doesn't matter what type it is, let's say a temperature sensor). This sensor will read it's environment reporting on (in this case) temperature. (Let's say the circuitry has been built and it's giving the data I need - via a desktop app)
My question is
List item I want to convert the sensor output to a 3D graph (any ideas guys),
I want to be able to show the graph on PC/smartphones (so think a web interface the best approach - unless someone/anyone has better ideas and most importantly links)
List item I want to show the temperature change/graph in 'real time' (absolutely crucial) through the web interface .
I think, the conversion of the data would have to be done server-side. I'm thinking (and I may be wrong so please do correct)
List item Client side - Get sensor data (via the desktop app)
List item Client side - Transmit data (via the desktop app - not sure how this would be done yet)
List item Server side - Convert data to graph
List item Server side - Transmit data/graph
List item Client side - Receive data
List item Client side - Show graph
If this were just a question of rendering a sensors data to a PC screen (self contained application) - I would feel confident to tackle it. However, I think where I'm getting stuck is the rendering/transmitting and displaying of the 3D images in real time using web technology, platforms and languages. If it helps, I am just picking up Php, MySql and python. I already know C/C++/VB and assembly.
I hope this makes sense, any starting points that you can give will be greatly appreciated
Jason :)
You could use MRTG http://en.wikipedia.org/wiki/Multi_Router_Traffic_Grapher
It provides real time and png graphics of sensor data.
It is very easy to configure and shows/records tipical 1 year of data in a RRD http://en.wikipedia.org/wiki/Round-Robin_Database

Real time disabling widgets in Qt

I have two radio buttons. When clicking one of them it should disable some widgets and activate some other. What should I do for that?
e.g If I check radioButton1 then it should disable a lineEdit instantly and if I check radioButton2 it should enable the first line edit and disable lineEdit2.
All this in real time.
Without having much to go on at the moment, a general answer would be the following:
Handle the appropriate signal of your radio buttons. Using this signal you can trigger a method/loop where you set your widgets to be disabled using setEnabled(false).
Given your situation you could have something similar to the following two methods, which you call depending on the signals you receive:
void OnRadioButton1()
{
lineEdit->setEnabled(false);
lineEdit2->setEnabled(true);
}
void OnRadioButton2()
{
lineEdit->setEnabled(true);
lineEdit2->setEnabled(false);
}
It's pretty straight-forward really. I don't understand where this whole notion of "real-time" comes into play. It's a single response to a single input "event".
Of course, this could just as well be a single method with a specific (boolean) argument or whatever. But given that we're discussing a hypothetical example case here that does not necessarily reflect your real code, this should at least provide you with a bit of an idea.

Resources