User Tools

Site Tools


projects:pafront:pa-terminal:software:software

Software for PA-Terminal

This projekt currently includes two pieces of software:

Assembler firmware for MicroChip® PIC16F84A-4

Versioning

Version Release date Assembler-Code Maschiencode (Hex) Discription Changes to earlier version from
PATermV1
(.0)
28.3.2013 PATermV1.asm Code für PIC16F84A-4
Checksum: EFC6
Current complete start version: Only use with Prototyp board PA-Terminal V1.0 Startversion Ca.Mueller@gsi.de
With Board “PA-Terminal V1.1.”
PATermV2 25.6.2013 PATermV2.asm PATermV2.hex
Checksum: E3C7
Version with PA-Terminal V1.1 board 1) Adaption an Platine “PA-terrminal V1.1” mit “Move”-Signal nun an PortB.RB0 statt PortA.RB0 (mögliche Abhandlung als Interrupt
2) Anpassung an nun richtig polare Antworttelegramme.
PATermV2.1 17.7.2013
Checksum: E7C7
Version with PA-Terminal V1.1 board although reinverse Stopbit (Line 1087)
PATermV2.2 18.7.2013
Checksum: FBFF/AD9D
Version with PA-Terminal V1.1 board 1) Initialisierung Entprellfilterbuffer nun ausserhalb Zyklus, da der Filter den Zyklus nutzt.
2) Sicherung Filterbuffer “Moved” während Interlock und späteres Rückschreiben.
3)Schreibe erhöhten Zählwert auch in Redundanzstellen
Toggle RB7 nach Konsistenzdurchlauf
PATermV2.3 22.7.2013
Checksum: B8EE
Version with PA-Terminal V1.1 board 1) Change Command #5 “Display toggle” in “Display on” and Befehl #10 “Display off”
PATermV2.4-5 23.7.2013 Version with PA-Terminal V1.1 board This PIC16F84A is recommended in Manual to operate on files (Byte) only to decimal values up to d'127'. This restriction is not present in simulation but only takes effect in real hardware. I.e. any subtraction uses complements, there bilding a positive difference will result in a carry bit, that is set and vice versa a negative difference will cause a cleared carry bit. That was changed in PWM.
PATermV2.6 24.7.2013 PAtermV2.6
Assembler Code V26
patermv2.6.hex
Checksum: 8A74
Version with PA-Terminal V1.1 board Code has two typs of interrupt: “Inidatasave” and “Traffic” (Asynchronous Remote Commands) to respond to. Although spikes (from moving drive by activating magnet valve) are eliminated by hardware as well as software filter functions this will cause entrance into “Inidatasave” interrupt. The related RB-change interlock was not cleared if exiting out of “Inidatasave”

The code inside the here used microprocessor is written in Assembler to use the limitted resources of it in the, hopefully, best way.

Programm structure

Current set of instructions/functions

 Instructios and response Main task of Mircrocontroller (MC) firmware is simple to count every inside movement of the pressured air drive to report that either at the eight digit local display or remotly to the far distance PLC unit. It has to stores that value in its built in none versatile EEPROM memory in case of power down. Microprocessor has to detect therefore beside the movement of the drive with “INSIDE” command although the power status of the primary 24V supply. In case of power loss a big capacity board of PA-Terminal insures for nearly one second power for the MC. That is enought to execute an interuped used to store important values. Of cause counter value is although storedin accelerator control system, but becuse GSI/FAIR accelarator is an experimantal facility number and places of air pressured driven diagnostic devices micght vary of the years or might be replaced for repair it important to store number of movements although within drive itselfes: the built in velded steel vacuum bellow has a limitted live time as it is a mechanically stressed part. This life time can be observed by the counter and maintance personal can observe that value.
PA-Terminal can interact remotly with a set of currently eight instructions about the system internal RS485-fieldbus. The command surly mostly used will be the request for the counter value. A comand that will be used properbly only one time is to set the ID or serialnumber of a that from 0-9999. If an on board jumper is kept open during power on that ID is let 0! Adressed by that first birth ID the SN can be set the a new destination number, although sored in none versatile memory. during operation the MC does continiously redundancy tests of the actual stored values. Each of them is stored three times and should any of it varry from its other two redundany places it will be corrected and a counter for values will be increased. That might occure because the PA-Terminal is postioned at the drive close to the beamline where in some cases hard radiation might be present. In that context a instruction for setting a counter value for correction meight although be useful if a missfit to values in accelerator controll system might be detected. As already mentioned the drives are proactive maintained. So during that times accelarator can be accessed an it makes sense to toggle on the local display of drive for on side controlls. In hopfully very rare cases the stored ID of a connected but not accessable drive might be loss: then the complete adress space can be requested for response to identify it again and restoring the original SN. The last two instructions are for requesting number of ouccured redundancy errors or setting it back to zero.

C-Code "patool" LINUX based

This code establishes network access to communicate through the LANTRONIC(TM) modul about the RS485-fieldbus to all the PA-Terminals connected to the bus. Cause of the fix and low data transfer rate of 9600 Baud (8N1) the long distance cable to a vacuum chamber with up to 6 drives / PA-Terminals might reach length of 1,6km (Structure see although RS485 -bus for counter control).

Versioning

Version Release date C-Quellcode related Make-file Discription Changes to earlier version from
0.3.1 27.3.2013 platool.c makefile (umbenennen ohne: ".TXT") Linux-Programm “platool” zur Kommunikation mit dem PA-Terminal über das LANTRONIX(R) UDS1100-Modul zur Umsetzung Ethernet-RS485 Startversion Timo
0.3.3 19.7.2013 platool3.3.c
C-Code V3.3
makefile (umbenennen ohne: ".TXT") Linux-Programm “platool” zur Kommunikation mit dem PA-Terminal über das LANTRONIX(R) UDS1100-Modul zur Umsetzung Ethernet-RS485 Change command #5 toggle Display to switch on Display and introduce command #10 switch off Display Timo
projects/pafront/pa-terminal/software/software.txt · Last modified: 2014/02/17 17:21 by carsten