PRAJASEKAR Posted November 23, 2016 Share Posted November 23, 2016 We have Labjack U12 and Daq Factory for Logging the Temp and Humidity data.Present facing issue how to miimize /Maximize the Daqfactory screen Buy using System.Function (Minimize) through Digital input , I have tried to start/stop the sequence not working pl help me how to do this my program as follows If (Mydigin[0] >1) System.Minimize(): endif Link to comment Share on other sites More sharing options...
AzeoTech Posted November 23, 2016 Share Posted November 23, 2016 Because of the way Windows messaging works, you can only call System.Minimize() (and Maximize()) from the main user interface thread of DAQFactory. This means it won't work from most Channel Events and not from a sequence started as a sequence. Likely what you'll need to do is use the OnPaint event for one of your screen components to do this. Link to comment Share on other sites More sharing options...
PRAJASEKAR Posted November 24, 2016 Author Share Posted November 24, 2016 i am not able could u pl send sample program of Onpaint event or (.ctl) file Link to comment Share on other sites More sharing options...
AzeoTech Posted November 28, 2016 Share Posted November 28, 2016 Sure, here you go... You have to select the component, then go to View -> Events and then select the OnPaint event and you'll see I added system.maximize(). If the component's page is displayed, if you try and make DAQFactory non-maximized, it will quickly revert back to maximized. automaximize.ctl Link to comment Share on other sites More sharing options...
PRAJASEKAR Posted December 2, 2016 Author Share Posted December 2, 2016 Dea Guru We have labjack u12 and stream data from analog sensors (Temp and Humidity) and getting logged in DAQFactory, This software is installed in siemens IPC, In IPC(Touch screen) machine control SCADA is running in full screen mode for process control,The IPC doesnt support mouse /keyboard in this mode,hence DAQ factory is in minmize mode can it be possible to program a code in DAQFactory software. so that by activating the labjackU12 digital input high to maximize the daqfactory to visuvalize the Temp & RH logger. I have tried several method when daqfactory in minimize mode it is not taking the IO's of labjack. Link to comment Share on other sites More sharing options...
AzeoTech Posted December 2, 2016 Share Posted December 2, 2016 Sure. Use the same method I gave, but add an if() statement in the OnPaint around the system.maximize(), so maximize() is only called when the digital input is high. You might add an else to minimize when it goes low. Link to comment Share on other sites More sharing options...
PRAJASEKAR Posted December 3, 2016 Author Share Posted December 3, 2016 I have try this but when DaqFactory in minimize position Onpaint events is not working (labjack u12 input = High) Program as follows If (Mydigin >= 1) System.Maximize else System.Minimize endif Link to comment Share on other sites More sharing options...
AzeoTech Posted December 6, 2016 Share Posted December 6, 2016 You are correct. When minimized, paint doesn't get called. I'm not sure I have a solution for you under the existing release of DAQFactory other than writing a separate application that finds the DAQFactory window and opens it. You could then use system.shellExecute() to run that when the digital input in DAQFactory wants to maximize the window. You can also post a request in our new features forum. Likely we'd either make minimize()/maximize() work from background threads, or provide a system event that runs in the main thread for this sort of thing. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.