‎11-15-2012 02:10 AM
Hi,
I am looking for suggestions/direction on the following.
We test cards, any amount 1 to 8, which are placed into slots within a single test chassis.
We need to get information of each card in turn in the chassis.
What we would like to do is to display a graphic of the chassis showing the cards in the slots. The number shown is determined by the used entering a number as to how many cards are to be tested.
Also to flash/active each slot in turn to prompt the used to enter information, the likes of model and serial number, which will be saved for use during testing.
Also this graphic will display the overall result, for each slot, at the end of the test with if possible a link to the test report.
Anyone give some direction?
Thanks for the help
Simon
‎11-15-2012 04:29 AM
This is a quite generic description but I can imagina to put a canvas on the application panel where to load a picture of your chassis. You can load the picture of an empty chassis and one or more pictures of the board under test to place in the appropriate position over the base image. The canvas permits you to generate boxes with wich you can pick out the elements you want on that chassis image.
This is just a concept skeleton for you to elaborate on and decide which solution actually use.
‎11-16-2012 02:48 AM
Roberto,
Thanks for that, I will give it a try.
I do understand it is generic but I am taking it from scratch and so exploring the options.
Do you know of an example of using the canvas?
Thanks for the pointers.
Simon
‎11-16-2012 03:42 AM
CVI comes with some examples on using canvasses: search "canvas" in the example finder and you will see all of them; other examples can be found in NI support site searching for "CVI canvas": here the result of the search, limited to examples only.
‎11-16-2012 03:46 AM
Thank you, I will see how far I can get,
Thanks
Simon
‎11-19-2012 09:36 AM
Hi,
Got to try this, it is almost what I am looking for, more due to lack of knowledge on how to control the CVI canvas.
I have command buttons which the used can click to enter a serial number via a PromptPopup.
With a canvas a callback is used, not sure if this is legitimate use, as soon as I move the mouse over it the PromptPopup will appear, not what I want.
If I put in case EVENT_COMMIT: in the canvas callback nothing will happen either moving over or doing a left mouse click.
What should be add to the canvas callback to only show the PromptPopup on a mouse click?
Thanks
Simon
‎11-19-2012 10:19 AM
As you can see here, the canvas control does not offer commit events: you must use mouse click events instead. While in the event callback, you can retrieve the mouse position using GetRelativemouseState and RectContainsPoint to determine whether the user has clicked on an "active" part of the canvas (identified by a Rect structure) or not.
‎11-20-2012 01:52 AM
Hi,
Thanks that has help a lot.
The building blocks are developing soon it will be time to bring them together.
Thank you
Simon