Excuse me, ladies and gentlemen: VB is running on event driven mechanism, such as after the click execute a function, want to ask is there any way to make this function Under the condition of without affecting its operation has been performed? Is to make the program execution in each scan cycle, as like in DOS The BASIC programming, also is the same effect and PLC. I now have a piece of I/O card, always inspect the status of external the abrupt stop switch, has been found that the abrupt stop switch is pressed, that is, I/O card data read back to 0, should immediately blockade output, I have thought of using the timer triggering event, but this is too slow, I want to read right away to the I/O card level change,
Excuse me what method?
CodePudding user response:
Use multithreading,
CodePudding user response:
Don't you "peripheral equipment", notify the ability? Should not so!
Peripherals you want to read information, it should be a communication mechanism, So, should be "stop switch and press", through the device of communication mechanism to "program" instructions, data "Program" will have to receive the data processing of the request message, at this point in the program for the corresponding processing,