Streamboolout in Code component
Posted: Mon Dec 20, 2010 11:58 am
Hi,
I have been using the code component to read the signal from a PWM module. The idea being to trigger every time the pulse from the PWM is high, and the frequency of the pulses varies (prototype for an engine dyno). I haven't been able to find a way to do this using the standard components.
I have the code component working and a scope shows the output to behave as expected. I am trying to use the 'streamboolout' function to output high every time a PWM high signal is detected so this can activate a counter.
I can't get the streamboolout to output any sort of signal, the bool output symbol on the right side of the code module us just grayed out, maybe I'm using the wrong syntax. I've tried:
streamboolout = 1;
streamboolout = 0;
streamboolout = high;
streamboolout = low; etc
How do I get the code component to output using streamboolout?
I have been using the code component to read the signal from a PWM module. The idea being to trigger every time the pulse from the PWM is high, and the frequency of the pulses varies (prototype for an engine dyno). I haven't been able to find a way to do this using the standard components.
I have the code component working and a scope shows the output to behave as expected. I am trying to use the 'streamboolout' function to output high every time a PWM high signal is detected so this can activate a counter.
I can't get the streamboolout to output any sort of signal, the bool output symbol on the right side of the code module us just grayed out, maybe I'm using the wrong syntax. I've tried:
streamboolout = 1;
streamboolout = 0;
streamboolout = high;
streamboolout = low; etc
How do I get the code component to output using streamboolout?