Home > Software engineering >  VB by external sensor signal to a rising edge, the TIMER performed 10 times
VB by external sensor signal to a rising edge, the TIMER performed 10 times

Time:10-11

1. VB through external sensor signals to a rising edge, the TIMER run 10 times, again get rising edge, the TIMER again 10 times, cycle through
2. VB via an external signal to a rising edge, the TIMER has been executed
Wish you write code to answer, thank you

CodePudding user response:

I rise along by external sensors to signal a 0 to 1. Not a serial port

CodePudding user response:

The first step you need to put the level of external sensor signals into WINDOWS can identify, to identify the signal you have two ways:
1, equipped with computer control card, digital conversion card, such as research degrees or NI have DIO digital card, and then by calling the DAQ function, can obtain high and low level signal
2, the sensor has a serial port, and then you through the serial port read the current level signal,

I think you is not understand, how to get outside of the trigger signal, generally is the above two methods

CodePudding user response:

refer to the second floor wangwei244157887 response:
the first step you need to put the level of external sensor signals into WINDOWS can identify, to identify the signal you have two ways:
1, equipped with computer control card, digital conversion card, such as research degrees or NI have DIO digital card, and then by calling the DAQ function, can obtain high and low level signal
2, the sensor has a serial port, and then you through the serial port read the current level signal,

I think you is not understand, how to get outside of the trigger signal, generally is the above two methods


The LZ has to write a driver

CodePudding user response:

I use is to study the data acquisition card, China can now be DI signal collected, but DI signal is from 0 to 1 to 0 to 1 cycle of change, I want to make the digital signal in 1 the TIMER has been executed

CodePudding user response:

Then with the method of interrupt, when the signal is 1 set Timer1. Enable to True can not ah

CodePudding user response:

I need when the signal is 1, the TIMER cycle 10 times, and then when the signal to 1, the TIMER recirculation 10 times,,,,

CodePudding user response:

Feel the things with PLC to do is the most suitable

CodePudding user response:

refer to 6th floor xofo2008 response:
I need when the signal is 1, the TIMER cycle 10 times, and then when the signal to 1, the TIMER recirculation 10 times,,,,

You in TIMR cumulative, using a variable when TIMR execution time, variable once, when added to 10 times, the TIMR Enabel to FalsE, this difficult?
  • Related