Alpha_display demonstrates writting data to an Alpha Display module over RS232¶
This script will display the station name, measurement label, and value on an Alpha Display connected to the RS232 port. To do this, setup the alpha_display task to run at whatever frequency you want the display to refresh. (5 or 10 sec is good) Assign the add_to_display function to each measurement you want to display. (this is done in the measurement tab) The alpha_display function will automatically update the list of measurements to display when you enable or display any measurement in the setup and it will also scale the sleep period between each measurement to fit the display refresh interval.
These functions will configure and display data on an Alpha display. The displays can do autobauding but you need to send 5 NUL characters before <SOH>. Configuring SL3 for RS232 and 9600 baud rate works too without sending NUL characters. example command string to display “SL3 TEST” on all display addresses: <SOH>”Z00”<STX>”AASL3 TEST”<EOT>
Code Description SOH start of header character Z Type code, “Z” means transmission is directed to all sign types 00 Sign code, “00” means all signs on network should listen to transmission STX Start of text character A Command code, “A” means write text file A File label, “A” is file label of the text file SL3 Test The actual string to display EOT End of transmission character
Assign this function to a measurement and it will add that measurement to a dictionary from which the display task will pull and display data from. This can be assigned to multiple measurements. :param inval: measurement value :return: unmodified measurement value :rtype: float
“This function should be setup as a script to run at the desired display refresh schedule. It will simply output data on the RS232 port to an Alpha display. The data is pulled form measDict dictionary which is populated by the add_to_display measurement function. If any measurement is enabled or disabled, the dictionary is cleared and only active measurements will repopulate it at the next measurement interval.
Adds required control commands to data being displayed.