08-29-2011 05:47 PM
Good day,
I'm trying to make a semaphore that will be controlled using the digital outputs of the module NI WSN 3202. The state of the digital output will depend on a certain voltage that will be readed by the analog input, if the voltage is greater than certain value the digital output will be On or it will be off, but also I want that this still work if the connection between the gateway and the 3202 is lost. Any ideas?
Best Regards,
Esteban Gonzalez.
P.s. This code doesnt work for me
08-31-2011 05:16 PM
Hello Esteban,
Thanks for the post!
I see that you are trying to control the digital output lines using information from an analog input. Using the LabVIEW WSN Module is the best way to do this.
I noticed that you are sending a radio message back to your host but not updating the digital front end. Might try code that looks more like this:
This will send a radio message back to your host so you know what the digital output state is and also update the digital front end with the value you want. Remember to set your digital line as an output in the start case. Here is another example of using digital output anlog with AI.
https://decibel.ni.com/content/docs/DOC-6124
Let us know if this helps!
Corby
WSN R & D PSE
09-06-2011 05:59 PM
Hello Corby_B,
It worked for me very well! thanks a lot!
I still have one problem, im trying to read a digital input too but its very slow and the digital imput im trying to read its kinda fast... like 60Hz.
Do you know a way that i can count the pulses using the WSN 3212 or 3220 and send the amount of pulses to the computer?
Thank you.
Best Regards,
Esteban Gonzalez
09-12-2011 04:18 PM
Hello Esteban,
You could set up one of the digital lines in the start case to generate notifications on a rising or falling edge. In the DIO notification case you can just increment a count and then send a radio message every 60 seconds or so on how many counts you have.
Please note, this feature was not designed to be a counter and everything is done in software, if you are in another state to long you may miss counts.
See this link for some more details:
https://decibel.ni.com/content/docs/DOC-9735
Let us know if this helps!
Corby
09-29-2011 12:00 PM
Good day.
It worked for me to use DIO Notifications and write in the DIO not in the Radio Messages.
¡Thanks a lot!
Best regards,
Esteban Gonzalez