Recently I used the APC220 RF modules in a project and thought I would upload some example code of how to use them.
The communication data is defined in the type def control this allows the flatten and unflatten to string functions as well as the VISA read function to know what the expected data is.
Information on the modules can be found here.
Below is a snippet from the demo program showing a read and write operation on the same PC, in order to run this code you simply need to connect your APC220 modules to you PC. Once you have configured them using the RF magic software (attached).
The modules need to have the same NET ID but different Node ID's. The other settings are up to you. I would recommend having the wireless/RF baud rate the same or higher than the serial baud rate to avoid bottle necking your communication link.
Once configured select the COM ports in the demo VI and run the code, you should get the data you entered into the write cluster appear on the Read cluster. You can simply change the type def to change the data that is being sent. The use of the type def allows the code to be modified easily to send different data.
*Note This code will also run with the higher power APC802 modules although these are not legal in all countries. Check with your countries laws to ensure you are not transmitting with to much power or and incorrect frequency.
