From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-23-2009 11:26 AM - edited 03-23-2009 11:31 AM
Discussion has been excellent, as usual, and the project has multiple changes this week.
The data acquisition object is a queue based task handler. See the test for an example of use. It is a parallel loop to the main UI loop. Note that the object reference is used in a single-element queue to allow the same object to be asynchronously accessed anywhere the queue is passed. The queue reference as part of the object is an example of regression using objects. I have never used this particular architecture before (single-element queue of object in the object), so it is an experiment.
Note that in two cases in the test, there is a wait for the data structures to properly initialize before proceeding. This functionality should probably be added to the object itself as either methods or parts of the get/set/command methods.
The data acquisition is not yet used by the main code. That will occur next week when we start integrating the objects into the main VI and turning on functionality.
Previous Installments
03-23-2009 06:40 PM
Thanks for long awaited new code.
But I frankly say, there is a bug magnet in there and if it would be my own code, I would start from scratch. Harsh words... I was thinking long about publishing these. If I'm wrong, as I'm not familiar with most of yours concepts at all, I apologize.
I can queue a 'stop' in the CommandsQueue, while the ExecutionLoop is in running state, which just enqueus another 'run' direcetly afterwards.
I cant't find the post right now, but it was suggested not to use a queued state machine together with a producer. I normally use diffrent ways of command transmissin, one for the state to state transmission and the commands from 'outside' are checked in spcificstates ('idle').
On root of this is a skipped design phase. For such code I would do myself a first draft on paper and pen, followed by a state chart in MS-PPT or OpenOffice Draw, trying to follow uml standards (no link in english wikipedia). During/after coding the original state chart is updated. Maybe I would even draw an Sequence diagram (wikipedia).
All such documentation is placed as picture inside the vi as well as a path to the document.
Got a minor set of arichtecture specific issues as well: I prefere to have operations on the same wire in the same layer, so the destroy queues should be in the same layer as the create queues, all the sound vis in the same layer (nothing inside the 'ConfigureAquisition.vi).
Sorry for that harsh critics, but you're on the blue side.
Felix
03-27-2009 05:00 PM