03-27-2008 06:00 AM
03-27-2008 06:05 AM
Hi Mathan,
You ll have to use the local variables to write the desired data to the other button when one button is pressed, thats it.
Maybe, you ve to take a little care so that the buttons do not race each other.
03-27-2008 06:19 AM
/////Hi Mathan,
/////You ll have to use the local variables to write the desired data to the other button when one button is pressed, thats it.
/////Maybe, you ve to take a little care so that the buttons do not race each other.
Dear partha,
You mean you ask me to create another two buttons and using its locals for controlling the actions of original two buttons? Please explain little bit.
Also, if i use a flat sequence structure for setting the switch controls, then corresponding switch actions not happening outside the structure. Please give me a sample structure for implementing this.
Thanks in advance,
Mathan
03-27-2008 06:28 AM
Not two more buttons to control the original two buttons. But only using the locals of those 2 original buttons only.
I dont have time left today for making the example. Ill post tomorrow.
03-27-2008 10:15 PM
03-27-2008 10:45 PM
mathan wrote:
From my another testing application (USBCV utility), When a window popup (say connect), i have to push one button down and when a window popup (say disconnect) i have to pull up the same button. When another window (say wakeup) popup i have to use the other switch button.The windows popup in this order: 1) Connect 2) Wakeup 3) Wakeup 4) Disconnect 5) Connect 6) Disconnect 7) Connect 😎 Disconnect......When the particular window popups, the corresponding switches will have to do that press/depress actions automatically.
03-28-2008 12:43 AM
Hai Partha,First of all thanks. I am sorry i didn't explained clearly in my previous post i think.Well. Here am explaining bit more detail.Actually the attached backbone.vi will be helpful in controlling the parallel port. For that i have used global.vi where 2 switches Connect/Disconnect and Remote buttons will be there. If i press Connect/Disconnect button once(Switch when pressed), it will enable the 2nd pin and again press means disable 2nd pin. The LED at the second place in data read register will help in knowing the status.The second switch Remote(Actually better if it was configured as Latch when released but due to latch incompatibility with global variables i reconfigured it as - Switch when released) controls control register C3. The Remote switch when pressed (that is when the C3 will get high value it will generate a mouse right click - it was developed by some hardwares using FET's and some small electronics circuits).All these portions i developed last week. Now i will explain what i originally requires....Actually the main aim of project is to test a USB device connected to the system. For that testing, a utility namely USBCV was there. It will do all the tests for the device. The thing is during the tests some small windows will popup saying connect the device or disconnect the device or it will say please initiate wakeup. Like that windows will popup for each and every test sequentially. Exactly 12 tests are there and the windows will popup in this order.1) Connect 2) Wakeup 3) Wakeup 4) Disconnect 5) Connect 6) Disconnect 7) Connect 😎 Disconnect......12)Disconnect.For these things its impossible for a man to sit and connect or disconnect the device when the test runs for say some 100 iterations. So everything needs to be automated. Hence i used some hardware setup and backbone.vi and global.vi and cross-checked manually giving inputs. When i launched the USBCV utility and run this vi and whenever the window popups asking connect or disconnect or wakeup, when i press the corresponding switch, the test undergoes very fine. No problem.Now am coming to the actual problem. For automating the test, whenever the utility generates a window popup, my vi should automatically press the corresponding switch.What i tried first time is - since i know the exact order of the window popup, i moved the mouse pointer(user32.dll - setcurtsorpos) to the corresponding switch and generate a click action automatically(user32.dll - mouse_event). But its not an effiicient way of programming and i gave up that idea even before developing it.I think i have explained some what understandable. I have attached the vi's also. Please help me in proceeding further. If possible give me a sample structure as early as possible. waiting for a favorite response.Thanks & Regards,Mathan
03-28-2008 02:08 AM
Hi Mathan,
I ve made your requirement using a simple Enum-Case driven State Machine model of programming architecture.
See the VIs & tell me if they roughly fit as your requirement. Modify as needed.
03-28-2008 03:41 AM
03-28-2008 04:29 AM
Hi Mathan,
It seems that you re very new to LabVIEW. An Input/Output can be passed to/from a SubVI by using the Connector Pane lying on the top-right corner of a VI. It can be accessed only from the Front Panel of a VI.
For that matter, any VI can be termed as a SubVI if it is sitting inside any other VI or called dynamically using the VI Server method.
You rt-click the Connector Pane & tell Show Connector so that LV displays a default Pattern of the Connector Pane.
Now, click on the Boolean on the FP & click on any box of the Connector Pane using the wiring tool to male a connection. You can see the box inherit the colour of the type of the control you have wired.
Normally, make it a practice to connect inputs on the left-half of the pane & outputs on the right-half of the pane.
After placing this SubVI inside the MainVI, just rt-click on the connected terminal & choose Create Constant from the short-cut menu to create that Boolean constant on the BD.
IMO, you have to study some basic tutorials of LV to get used to all these stuff.