Taking ship out for spin would required an big donation from you of course.
Yes, I will post the site for everyone to see and operate the system when are ready.
There will be an demo program for the testing phase of course, before it is finally turned on. This program will work just like if an real Bilge switch was triggered or if the F/A was in alarm or in trouble. This needs to be done to test the site with the I/O board.
Remember this is just one of projects we have on our plate. So visit our website to see what is going on.
One of my big bits of code is done for the Propeller I/O Controller. This code was compiled using an program call PICoPLC, which is a ladder logic editor that converts the ladder logic into spin. I will post the code that the PICoPLC compiled later on. PICoPLC allow me to do the I/O Controller in ladder logic and it also allow me to test it before it is programmed on the Propeller.
This now leaves me to do the code for the Top Object file, which communicates between the Spinneret and Propeller Platform USB Board and brings everything together in one application. Also I started on the RS-485 code, which allows the future expansion to other boards on a RS-485 network.
I also started on the PCB this past weekend that needs to be made, which the Propeller Platform USB sets on top of. This has the I/O circuits on it so that outside world can come into the Propeller's world. This board has four IC types on it and they are
1) Voltage Regulator for the I/O to the board
2) ULN2003 to drive the relays.
3) Optoisolators for the inputs.
One question still reminds and that is. Since I am going to use Full Duplex Serial to communicate with the Spinneret on two I/O pins, I am wondering if I can share these two pins with the RS-485 chip (LTC 1485 or ADM1485), which this will save me an I/O pin?
Remember, I used one of your suggestions already and I am still open for any others you my have.
One question still reminds and that is. Since I am going to use Full Duplex Serial to communicate with the Spinneret on two I/O pins, I am wondering if I can share these two pins with the RS-485 chip (LTC 1485 or ADM1485), which this will save me an I/O pin?
I think you can share the DI/RO pins with the serial driver's Rx/Tx pins. I'd have to test the interface to be sure. But I don't think it is a good idea. You'll have to deal with collisions or timing and modify the FullDuplex driver.
Thanks Mike, I had the feeling sharing the DI/RO pins with the serial driver's Rx/Tx pins maybe an problem. I may end up doing what I was planning before I posted that question.
I like would to pass this update to everyone regardening how I plan to communicate with the Spinneret.
As you may know, I was going to use the Full Duplex Serial object to do this task, but the after Mike G. pointed out, that the Spinneret 3 pin header for serial I had to do some thinking. I also wanted gain the extra I/O, so I can use the last pin on the ULN2003A and do RS-485 which needs two pins minimum (one for serial and the other for direction control). So, what I am going to do is, use one pin for Bi-direction serial to communicate with the Spinneret and Bi-direction serial on another pin to communicate with the RS-485 chip and this leaves the one pin to control the direction of the RS-485 chip.
I will agian update my first post that I made regardening the change in plans.
I would like to show everyone the finished code for the ladder logic part of are monitoring system, which was compiled from the PICoPLC ladder logic editor program.
If you want to view the ladder logic itself you will need to download the PICoPLC program. Just do a search for PICoPLC in the search box and you should find the link for the software. I will send the ladder file, which this was compiled from to anyone who wants to see it by email, just PM me your request.
[code]{ This is auto-generated code from PICoPLC. Do not edit this file! Go
back to the ladder diagram source for changes in the logic, and compile }
CON
_CLKFREQ = 4000000 'Hz
_CLKMODE = XTAL1 + PLL16X
CycleTime = 100 '1/sec
var
BYTE I_mcr
var
BYTE I_rung_top
var
BYTE U_Rpulsebit
var
WORD U_Tfreerun
var
BYTE I_parOut_0000
var
BYTE I_parThis_0000
var
BYTE I_oneShot_0000
var
WORD U_Cshift
con
U_Xbilge1 = 5
con
U_Xacbilgeloss = 4
var
WORD U_Tdelay1
var
BYTE U_Ralrmsil1
var
BYTE I_parOut_0001
var
BYTE I_parThis_0001
var
WORD I_scratch2
var
BYTE I_parOut_0002
var
BYTE I_parThis_0002
var
WORD U_alrmvar
var
BYTE U_Rtextsil1
var
WORD U_smsvar
var
BYTE U_Ralrm1
var
BYTE I_parOut_0003
var
BYTE I_parThis_0003
var
BYTE I_parOut_0004
var
BYTE I_parThis_0004
con
U_Xsilencepb = 19
var
WORD U_silvar
var
BYTE U_Rsysreset
var
BYTE I_parOut_0005
var
BYTE I_parThis_0005
var
BYTE U_Rtextsil
con
U_Xbilge2 = 6
var
WORD U_Tdelay2
var
BYTE U_Ralrmsil2
var
BYTE I_parOut_0006
var
BYTE I_parThis_0006
var
BYTE I_parOut_0007
var
BYTE I_parThis_0007
var
BYTE U_Rtextsil2
var
BYTE U_Ralrm2
var
BYTE I_parOut_0008
var
BYTE I_parThis_0008
var
BYTE I_parOut_0009
var
BYTE I_parThis_0009
var
BYTE I_parOut_000a
var
BYTE I_parThis_000a
con
U_Xbilge3 = 7
var
WORD U_Tdelay3
var
BYTE U_Ralrmsil3
var
BYTE I_parOut_000b
var
BYTE I_parThis_000b
var
BYTE I_parOut_000c
var
BYTE I_parThis_000c
var
BYTE U_Rtextsil3
var
BYTE U_Ralrm3
var
BYTE I_parOut_000d
var
BYTE I_parThis_000d
var
BYTE I_parOut_000e
var
BYTE I_parThis_000e
var
BYTE I_parOut_000f
var
BYTE I_parThis_000f
con
U_Xbilge4 = 8
var
WORD U_Tdelay4
var
BYTE U_Ralrmsil4
var
BYTE I_parOut_0010
var
BYTE I_parThis_0010
var
BYTE I_parOut_0011
var
BYTE I_parThis_0011
var
BYTE U_Rtextsil4
var
BYTE U_Ralrm4
var
BYTE I_parOut_0012
var
BYTE I_parThis_0012
var
BYTE I_parOut_0013
var
BYTE I_parThis_0013
var
BYTE I_parOut_0014
var
BYTE I_parThis_0014
con
U_Xbilge5 = 9
var
WORD U_Tdelay5
var
BYTE U_Ralrmsil5
var
BYTE I_parOut_0015
var
BYTE I_parThis_0015
var
BYTE I_parOut_0016
var
BYTE I_parThis_0016
var
BYTE U_Rtextsil5
var
BYTE U_Ralrm5
var
BYTE I_parOut_0017
var
BYTE I_parThis_0017
var
BYTE I_parOut_0018
var
BYTE I_parThis_0018
var
BYTE I_parOut_0019
var
BYTE I_parThis_0019
con
U_Xbilge6 = 10
var
WORD U_Tdelay6
var
BYTE U_Ralrmsil6
var
BYTE I_parOut_001a
var
BYTE I_parThis_001a
var
BYTE I_parOut_001b
var
BYTE I_parThis_001b
var
BYTE U_Rtextsil6
var
BYTE U_Ralrm6
var
BYTE I_parOut_001c
var
BYTE I_parThis_001c
var
BYTE I_parOut_001d
var
BYTE I_parThis_001d
var
BYTE I_parOut_001e
var
BYTE I_parThis_001e
con
U_Xbilge7 = 11
var
WORD U_Tdelay7
var
BYTE U_Ralrmsil7
var
BYTE I_parOut_001f
var
BYTE I_parThis_001f
var
BYTE I_parOut_0020
var
BYTE I_parThis_0020
var
BYTE U_Rtextsil7
var
BYTE U_Ralrm7
var
BYTE I_parOut_0021
var
BYTE I_parThis_0021
var
BYTE I_parOut_0022
var
BYTE I_parThis_0022
var
BYTE I_parOut_0023
var
BYTE I_parThis_0023
con
U_Xbilge8 = 12
var
WORD U_Tdelay8
var
BYTE U_Ralrmsil8
var
BYTE I_parOut_0024
var
BYTE I_parThis_0024
var
BYTE I_parOut_0025
var
BYTE I_parThis_0025
var
BYTE U_Rtextsil8
var
BYTE U_Ralrm8
var
BYTE I_parOut_0026
var
BYTE I_parThis_0026
var
BYTE I_parOut_0027
var
BYTE I_parThis_0027
var
BYTE I_parOut_0028
var
BYTE I_parThis_0028
con
U_Xbilge9 = 13
var
WORD U_Tdelay9
var
BYTE U_Ralrmsil9
var
BYTE I_parOut_0029
var
BYTE I_parThis_0029
var
BYTE I_parOut_002a
var
BYTE I_parThis_002a
var
BYTE U_Rtextsil9
var
BYTE U_Ralrm9
var
BYTE I_parOut_002b
var
BYTE I_parThis_002b
var
BYTE I_parOut_002c
var
BYTE I_parThis_002c
var
BYTE I_parOut_002d
var
BYTE I_parThis_002d
var
WORD U_Tdelay10
var
BYTE U_Ralrmsil10
var
BYTE I_parOut_002e
var
BYTE I_parThis_002e
var
BYTE I_parOut_002f
var
BYTE I_parThis_002f
var
BYTE U_Rtextsil10
var
BYTE U_Ralrm10
var
BYTE I_parOut_0030
var
BYTE I_parThis_0030
var
BYTE I_parOut_0031
var
BYTE I_parThis_0031
var
BYTE I_parOut_0032
var
BYTE I_parThis_0032
var
WORD U_Tdelay11
var
BYTE U_Ralrmsil11
var
BYTE I_parOut_0033
var
BYTE I_parThis_0033
var
BYTE I_parOut_0034
var
BYTE I_parThis_0034
var
BYTE U_Rtextsil11
var
BYTE U_Ralrm11
var
BYTE I_parOut_0035
var
BYTE I_parThis_0035
var
BYTE I_parOut_0036
var
BYTE I_parThis_0036
var
BYTE I_parOut_0037
var
BYTE I_parThis_0037
var
WORD U_Tdelay12
var
BYTE U_Ralrmsil12
var
BYTE I_parOut_0038
var
BYTE I_parThis_0038
var
BYTE I_parOut_0039
var
BYTE I_parThis_0039
var
BYTE U_Rtextsil12
var
BYTE U_Ralrm12
var
BYTE I_parOut_003a
var
BYTE I_parThis_003a
var
BYTE I_parOut_003b
var
BYTE I_parThis_003b
var
BYTE I_parOut_003c
var
BYTE I_parThis_003c
var
WORD U_Tdelay13
var
BYTE U_Ralrmsil13
var
BYTE I_parOut_003d
var
BYTE I_parThis_003d
var
BYTE I_parOut_003e
var
BYTE I_parThis_003e
var
BYTE U_Rtextsil13
var
BYTE U_Ralrm13
var
BYTE I_parOut_003f
var
BYTE I_parThis_003f
var
BYTE I_parOut_0040
var
BYTE I_parThis_0040
var
BYTE I_parOut_0041
var
BYTE I_parThis_0041
con
U_Xfaalarm = 14
var
WORD U_Tdelay14
var
BYTE U_Rfahornsil
var
BYTE I_parOut_0042
var
BYTE I_parThis_0042
var
BYTE I_parOut_0043
var
BYTE I_parThis_0043
var
BYTE U_Rtextsil14
var
BYTE U_Ralrm14
var
BYTE I_parOut_0044
var
BYTE I_parThis_0044
var
BYTE I_parOut_0045
var
BYTE I_parThis_0045
con
U_Yfahornsil = 22
var
BYTE I_parOut_0046
var
BYTE I_parThis_0046
con
U_Xfatrouble = 15
var
WORD U_Tdelay15
var
BYTE U_Ralrmsil15
var
BYTE I_parOut_0047
var
BYTE I_parThis_0047
var
WORD U_statvar
var
BYTE U_Ralrm15
var
BYTE I_parOut_0048
var
BYTE I_parThis_0048
var
BYTE I_parOut_0049
var
BYTE I_parThis_0049
con
U_Xportpwrbreaker = 17
con
U_Xportprwloss = 16
var
WORD U_Tdelay16
var
BYTE I_scratch
var
BYTE I_oneShot_0001
var
BYTE I_parOut_004a
var
BYTE I_parThis_004a
var
BYTE I_parOut_004b
var
BYTE I_parThis_004b
var
BYTE U_Ralrml2
var
BYTE U_Ralarm
var
BYTE I_parOut_004c
var
BYTE I_parThis_004c
var
BYTE U_Rflash
var
WORD U_Tflashon
var
BYTE I_Tflashoff_antiglitch
var
WORD U_Tflashoff
con
U_Yalrmbuzzer = 21
var
BYTE I_parOut_004d
var
BYTE I_parThis_004d
con
U_Yalarmlt = 20
var
BYTE I_parOut_004e
var
BYTE I_parThis_004e
con
U_Xresetpb = 18
var
WORD U_resetvar
var
BYTE I_parOut_004f
var
BYTE I_parThis_004f
var
BYTE I_parOut_0050
var
BYTE I_parThis_0050
VAR
LONG stack[100]
LONG cog
PUB Start
cog := cognew(PlcCycle, @stack) +1
PUB Stop
if (cog)
cogstop(cog~ - 1)
cog~
PRI PlcCycle | timing
DIRA := $00700000
DIRB := $00000000
... are compiled in a Word format, will I need to change them to a Byte so I can passed to my Top Object in order for the communicate with the Spinneret?
If all the code is running in a single Propeller, which sounds like the case, then simply expose the member in getters and setters, pass the word by value, or use a pointer to reference to the word value. This concept is covered extensively in the Propeller manual. If you are sending the word over serial com then yes the bytes come in one at a time. Usually high byte first.
OK, I figure out what I want to do with the serial and how I am going to interface with the RS-485 chip (LTC 1485 or ADM1485). This means I can finish the PCB design and send the board off to be made this week.
I also started on the top object file and noticed a minor codding problem, that I am having problems fixing. When I compile the program, I am getting this error message "Expected end of line" for this ":" in my part of my code
Serial.rx: resetvar
I try even try this as well and it doesn't work:blank:
Serial.rx: resetvar | t
Here is my top object code for everyone to look it.
{{Propeller I/O Controller Top Object file
**************************************
* Propeller_IO_Controller.spin *
* William Stefan *
* Version 0.1 *
**************************************
* See end of file for terms of use. *
**************************************
}}
CON
_clkmode =xtal1+pll16x
_XINFREQ =5_000_000
OBJ
Serial : "Simple_Serial" 'Serial for the Spinneret and RS485
PLC : "ZuniTam Monitoring System" 'Spin PLC code
PUB Initserial 'Initializes serial for the Spinneret and RS485
Serial.init(25, 25, 19200) 'Spinneret Serial Same-Pin (Bi-Directional) True Mode
Serial.init(26, 26, 19200) 'RS485 Serial Same-Pin (Bi-Directional) True Mode
PUB Initplc 'Initializes Spin PLC code
PLC.Start 'Starts Spin PLC code in new cog
waitcnt(clkfreq * 1 + cnt)
pub Main
repeat
Tx_web
waitcnt(clkfreq * 1 + cnt)
Rx_web
waitcnt(clkfreq * 1 + cnt)
PUB Tx_web | t, alarmvar, U_alrmvar, smsvar, U_smsvar 'Bilge/FA Alarms, Pwr Status and SMS Messages (future)
if U_alrmvar >= 1
alarmvar := U_alrmvar
Serial.tx(alarmvar)
if U_smsvar >= 1
smsvar := U_smsvar
Serial.tx(smsvar)
return
PUB Rx_web | t, resetvar, U_resetvar, silvar, U_silvar 'System Reset and Silence
if U_resetvar == 1
resetvar := U_resetvar
Serial.rx: resetvar
if U_silvar == 1
silvar := U_silvar
Serial.rx: silvar
return
I used the Simple_Serial object, which is going to be used for bi-directional serial for the RSS485 chip and the Spinneret. Here is the method for the RX part of the Simple_Serial object where the error being generated at
PUB rx: rxByte | t
{{ Receive a byte; blocks caller until byte received. }}
if rxOkay
dira[sin]~ ' make rx pin an input
waitpeq(inverted & |< sin, |< sin, 0) ' wait for start bit
t := cnt + bitTime >> 1 ' sync + 1/2 bit
repeat 8
waitcnt(t += bitTime) ' wait for middle of bit
rxByte := ina[sin] << 7 | rxByte >> 1 ' sample bit
waitcnt(t + bitTime) ' allow for stop bit
rxByte := (rxByte ^ inverted) & $FF ' adjust for mode and strip off high bits
So, is what is causing this error and now it's not the Simple Serial object. Because I compile it and compiles with no errors.
I like to pass this update on to everyone. The PCB is made and the testing of system will be starting in the middle of May. I will also post the drawing and pics of the PCB for everyone to see by the end of next week.
We were testing the Propeller I/O Controller today and ran to a minor problem with the test code. What I am looking for, is someone to test my test file for me to see if they are any problems with.
{{Propeller I/O Controller Top Object file
**************************************
* Propeller_IO_Test.spin *
* William Stefan *
* Version 0.1 *
**************************************
* See end of file for terms of use. *
**************************************
}}
CON
_clkmode =xtal1+pll16x
_XINFREQ =5_000_000
OBJ
pst : "Parallax Serial Terminal" 'Debuging interface
plc : "ZuniTam Monitoring System" 'Spin PLC code
PUB Init
plc.Start 'Starts Spin PLC code in new cog
waitcnt(clkfreq * 1 + cnt)
pst.Start(9600)
PUB Main
repeat
BilgeAlarm_1
BilgeAlarm_2
BilgeAlarm_3
BilgeAlarm_4
BilgeAlarm_5
BilgeAlarm_6
BilgeAlarm_7
BilgeAlarm_8
BilgeAlarm_9
BilgeAlarm_10
BilgeAlarm_11
BilgeAlarm_12
BilgeAlarm_13
Alarm_14
Status_States
Reset_Silence
PUB BilgeAlarm_1 | U_Xbilge1, U_alrmvar
if U_Xbilge1 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 1 on "))
if U_alrmvar == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 1 "))
return
PUB BilgeAlarm_2 | U_Xbilge2, U_alrmvar
if U_Xbilge2 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 2 on "))
if U_alrmvar == 2
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 2 "))
return
PUB BilgeAlarm_3 | U_Xbilge3, U_alrmvar
if U_Xbilge3 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 3 on "))
if U_alrmvar == 3
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 3 "))
return
PUB BilgeAlarm_4 | U_Xbilge4, U_alrmvar
if U_Xbilge4 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 4 on "))
if U_alrmvar == 4
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 4 "))
return
PUB BilgeAlarm_5 | U_Xbilge5, U_alrmvar
if U_Xbilge5 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 5 on "))
if U_alrmvar == 5
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 5 "))
return
PUB BilgeAlarm_6 | U_Xbilge6, U_alrmvar
if U_Xbilge6 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 6 on "))
if U_alrmvar == 6
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 6 "))
return
PUB BilgeAlarm_7 | U_Xbilge7, U_alrmvar
if U_Xbilge7 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 7 on "))
if U_alrmvar == 7
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 7 "))
return
PUB BilgeAlarm_8 | U_Xbilge8, U_alrmvar
if U_Xbilge8 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 8 on "))
if U_alrmvar == 8
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 8 "))
return
PUB BilgeAlarm_9 | U_Xbilge9, U_alrmvar
if U_Xbilge9 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 9 on "))
if U_alrmvar == 9
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 9 "))
return
PUB BilgeAlarm_10 | U_Xbilge4, U_alrmvar, U_Xacbilgeloss
if U_Xbilge4 == 1 and U_Xacbilgeloss == 1
pst.Str(string(pst#CE, pst#HM, "12VDC bilge alarm float 1 on "))
if U_alrmvar == 10
pst.Str(string(pst#CE, pst#HM, "12VDC bilge alarm 1 "))
return
PUB BilgeAlarm_11 | U_Xbilge2, U_alrmvar, U_Xacbilgeloss
if U_Xbilge2 == 1 and U_Xacbilgeloss == 1
pst.Str(string(pst#CE, pst#HM, "12VDC bilge alarm float 2 on "))
if U_alrmvar == 11
pst.Str(string(pst#CE, pst#HM, "12VDC bilge alarm 2 "))
return
PUB BilgeAlarm_12 | U_Xbilge8, U_alrmvar, U_Xacbilgeloss
if U_Xbilge8 == 1 and U_Xacbilgeloss == 1
pst.Str(string(pst#CE, pst#HM, "12VDC bilge alarm float 3 on "))
if U_alrmvar == 12
pst.Str(string(pst#CE, pst#HM, "12VDC bilge alarm 3 "))
return
PUB BilgeAlarm_13 | U_Xbilge9, U_alrmvar, U_Xacbilgeloss
if U_Xbilge9 == 1 and U_Xacbilgeloss == 1
pst.Str(string(pst#CE, pst#HM, "12VDC bilge alarm float 4 on "))
if U_alrmvar == 13
pst.Str(string(pst#CE, pst#HM, "12VDC bilge alarm 4 "))
return
PUB Alarm_14 | U_alrmvar
if U_alrmvar == 14
pst.Str(string(pst#CE, pst#HM, "fire alarm in alarm "))
return
PUB Status_States | U_statvar
if U_statvar == 1
pst.Str(string(pst#CE, pst#HM, "fire alarm in trouble"))
if U_statvar == 2
pst.Str(string(pst#CE, pst#HM, "port power breaker on"))
if U_statvar == 3
pst.Str(string(pst#CE, pst#HM, "port shore power loss"))
if U_statvar == 4
pst.Str(string(pst#CE, pst#HM, "120VAC bilge power loss"))
return
PUB Reset_Silence | U_resetvar, U_silvar
pst.Str(string(pst#CE, pst#HM, "resetvar ="))
pst.Dec(U_resetvar)
U_resetvar := pst.DecIn
pst.Str(string(pst#CE, pst#HM, "silencevar ="))
pst.Dec(U_silvar)
U_silvar := pst.DecIn
return
Note that some inputs need to be trigger for more than 3 seconds
I really hope Mike Green sees this post and chimes in, Mike had a knack for explaining this stuff.
Brace yourself... the problem is your understanding of SPIN and SPIN objects.
The "ZuniTam Monitoring System" object does not expose (make visible) its members. That means the test code can not see the VARs in "ZuniTam Monitoring System".
The "Propeller Education Kit Labs-Fundamentals" covers objects in chapters 5 and 6 and can be found in the help drop down of the Propeller tool.
I noticed a possible problem with the "ZuniTam Monitoring System" object when looking it over yesterday afternoon and why it does not see the VARs. The "ZuniTam Monitoring System" object was compiled with a PRI method instead of a PUB method. I learned this from the Propeller Tool help file and my book called "Programming and Customizing the Multicore Propeller microcontroller. I think this was causing my problem.
There is one private method, PRI PlcCycle | timing, in "ZuniTam Monitoring System" but that's ok because the PUB Start method of "ZuniTam Monitoring System" invokes PlcCycle and the "Test" object invoke pcl.Start.
Problem: At run time COG 0 runs out of code at pst.Start. Main is never called. However, the "ZuniTam Monitoring System" is running in COG 1.
Problem: U_Xbilge1 and U_alrmvar are uninitialized when PUB BilgeAlarm_1 is invoked. Since the scope of U_Xbilge1 and U_alrmvar are within BilgeAlarm, U_Xbilge1 and U_alrmvar are always 0. None of the PUBs in the "Test" code will send data to the terminal because the variables are local to the PUB and never initialized.
PUB BilgeAlarm_1 | U_Xbilge1, U_alrmvar
if U_Xbilge1 == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm float 1 on "))
if U_alrmvar == 1
pst.Str(string(pst#CE, pst#HM, "120VAC bilge alarm 1 "))
return
In "ZuniTam Monitoring System" you have
con
U_Xbilge1 = 5
...
var
WORD U_alrmvar
I believe you want to evaluate U_alrmvar stored in "ZuniTam Monitoring System" from your "Test" code. I'm not sure because there are no comments in your code that describe what's going on. If you want the ability to see U_alrmvar in the top "Test" object then you must expose the VAR through a method or drop U_alrmvar in a DAT section and reference U_alrmvar with a pointer. The following code example exposes U_alrmvar with a method in "ZuniTam Monitoring System"
var
WORD U_alrmvar
PUB getU_alrmvar
return U_alrmvar
Now U_alrmvar is visible to the top "Test" object by...
plc.getU_alrmvar
I don't know if you cracked open chapter 5 and 6 in "Propeller Education Kit Labs-Fundamentals". Chapters 5 and 6 explains in detail the constructs explained above.
Thanks for looking at the code. The "ZuniTam Monitoring System" was generated by a ladder logic program called PicOPlc which compile the spin code.
So, what do you think will take care of this problem?
I did read those chapters of PE and have been reading my new book on the Propeller. I can say that coding without the Propeller itself doesn't help me at all. I just received Propeller this past weekend and need to write some basic code this week.
Go through the PE kit tutorials with your Prop by your side. That will help your understanding.
I said the ZuniTam Monitoring System object is fine. I should have said, the code runs but I don't know if the results are what you expect. There seems to be a lot of cryptic code for monitoring I/O.
I said the ZuniTam Monitoring System object is fine. I should have said, the code runs but I don't know if the results are what you expect. There seems to be a lot of cryptic code for monitoring I/O.
I agree with you 100% Mike that's why I am changing the way I code the I/O controller, which I started coding today. Yes, the current code is very cryptic and it is hard for someone to read the spin code compiled by the PicOPlc program. I need to make the project simpler, so the other member of our group who as the Spinneret and in the contest with me can test his coding.
The Spinneret Contest is down to the wire for those who entered. I got my new code for me I/O controller working the way I want it too, which will be connected to the Spinneret and started on project docs. I will testing the whole system next week and will post my findings to the forum members after the testing is complete.
Since the contest has closed and I didn't get my project submitted on time. I will post my entry for the Web based Ship Monitoring and Control system as per the guidelines set fourth by Parallax. The code for the I/O controller, the Spinneret and the project report will all be posted no later than this time next week. Good luck to those who have entered into this contest.
As, I write this me the other member of are group are still working on and testing the final Spinneret/HTML code that will be used in are application. But, I was asked to submit something for the contest anyway by the judges of the contest, so they can judge it anyway.
Not a bad program that you did and just finished looking it over after coming home from overnight maintenance job.
BTW, For those wondering about the status of my project. We are in a location where it is hard for our volunteers to access the ship, which has made it hard for us to get on the ship to install the monitoring system on board and test it. We hoping to get a spot that is near are current location to tie up and this will us allow better access for members and guests to board the ship safely.
For those wondering how we and I am coming along with the Web Based Ship Monitoring System, we haven't gotten very far. The Ship has been in the same spot for the last 18 mouths and if I was able to board the ship safely I would have a chance to test this Spinneret project and have it up and running and it would have detected a leak that flooded our main engine room this past May.
Right now we need to raise $40,000 to make the needed repairs to the hull of our ship and we started a fundraiser on this fundraiser site http://www.razoo.com/story/Help-Save-And-Restore-The-Uss-Zuni-Atf-95-Usgc-Tamaroa-Wmec-166. For those, who are interested in saving a ship with two histories, one that earn her 4 battle stars in the South Pacific in WWII and the other assisted the rescue of the three crewmembers aboard the sailboat Satori during the Perfect Storm in 1991, which latter became a film with the same name.
I would love to see this project completed and see the ship saved for future generations since this is the last chance to save her.
BTW, when you visit the fundraiser site that I started today, there is no video. But, one will be posted and you guys will really like it due to who is narrating it. I will reveal who this person later on
Comments
Yes, I will post the site for everyone to see and operate the system when are ready.
There will be an demo program for the testing phase of course, before it is finally turned on. This program will work just like if an real Bilge switch was triggered or if the F/A was in alarm or in trouble. This needs to be done to test the site with the I/O board.
Remember this is just one of projects we have on our plate. So visit our website to see what is going on.
One of my big bits of code is done for the Propeller I/O Controller. This code was compiled using an program call PICoPLC, which is a ladder logic editor that converts the ladder logic into spin. I will post the code that the PICoPLC compiled later on. PICoPLC allow me to do the I/O Controller in ladder logic and it also allow me to test it before it is programmed on the Propeller.
This now leaves me to do the code for the Top Object file, which communicates between the Spinneret and Propeller Platform USB Board and brings everything together in one application. Also I started on the RS-485 code, which allows the future expansion to other boards on a RS-485 network.
I also started on the PCB this past weekend that needs to be made, which the Propeller Platform USB sets on top of. This has the I/O circuits on it so that outside world can come into the Propeller's world. This board has four IC types on it and they are
1) Voltage Regulator for the I/O to the board
2) ULN2003 to drive the relays.
3) Optoisolators for the inputs.
One question still reminds and that is. Since I am going to use Full Duplex Serial to communicate with the Spinneret on two I/O pins, I am wondering if I can share these two pins with the RS-485 chip (LTC 1485 or ADM1485), which this will save me an I/O pin?
Remember, I used one of your suggestions already and I am still open for any others you my have.
I think you can share the DI/RO pins with the serial driver's Rx/Tx pins. I'd have to test the interface to be sure. But I don't think it is a good idea. You'll have to deal with collisions or timing and modify the FullDuplex driver.
Why not use J2's Rx/Tx and J1 for the RS485?
As you may know, I was going to use the Full Duplex Serial object to do this task, but the after Mike G. pointed out, that the Spinneret 3 pin header for serial I had to do some thinking. I also wanted gain the extra I/O, so I can use the last pin on the ULN2003A and do RS-485 which needs two pins minimum (one for serial and the other for direction control). So, what I am going to do is, use one pin for Bi-direction serial to communicate with the Spinneret and Bi-direction serial on another pin to communicate with the RS-485 chip and this leaves the one pin to control the direction of the RS-485 chip.
I will agian update my first post that I made regardening the change in plans.
If you want to view the ladder logic itself you will need to download the PICoPLC program. Just do a search for PICoPLC in the search box and you should find the link for the software. I will send the ladder file, which this was compiled from to anyone who wants to see it by email, just PM me your request.
[code]{ This is auto-generated code from PICoPLC. Do not edit this file! Go
back to the ladder diagram source for changes in the logic, and compile }
CON
_CLKFREQ = 4000000 'Hz
_CLKMODE = XTAL1 + PLL16X
CycleTime = 100 '1/sec
var
BYTE I_mcr
var
BYTE I_rung_top
var
BYTE U_Rpulsebit
var
WORD U_Tfreerun
var
BYTE I_parOut_0000
var
BYTE I_parThis_0000
var
BYTE I_oneShot_0000
var
WORD U_Cshift
con
U_Xbilge1 = 5
con
U_Xacbilgeloss = 4
var
WORD U_Tdelay1
var
BYTE U_Ralrmsil1
var
BYTE I_parOut_0001
var
BYTE I_parThis_0001
var
WORD I_scratch2
var
BYTE I_parOut_0002
var
BYTE I_parThis_0002
var
WORD U_alrmvar
var
BYTE U_Rtextsil1
var
WORD U_smsvar
var
BYTE U_Ralrm1
var
BYTE I_parOut_0003
var
BYTE I_parThis_0003
var
BYTE I_parOut_0004
var
BYTE I_parThis_0004
con
U_Xsilencepb = 19
var
WORD U_silvar
var
BYTE U_Rsysreset
var
BYTE I_parOut_0005
var
BYTE I_parThis_0005
var
BYTE U_Rtextsil
con
U_Xbilge2 = 6
var
WORD U_Tdelay2
var
BYTE U_Ralrmsil2
var
BYTE I_parOut_0006
var
BYTE I_parThis_0006
var
BYTE I_parOut_0007
var
BYTE I_parThis_0007
var
BYTE U_Rtextsil2
var
BYTE U_Ralrm2
var
BYTE I_parOut_0008
var
BYTE I_parThis_0008
var
BYTE I_parOut_0009
var
BYTE I_parThis_0009
var
BYTE I_parOut_000a
var
BYTE I_parThis_000a
con
U_Xbilge3 = 7
var
WORD U_Tdelay3
var
BYTE U_Ralrmsil3
var
BYTE I_parOut_000b
var
BYTE I_parThis_000b
var
BYTE I_parOut_000c
var
BYTE I_parThis_000c
var
BYTE U_Rtextsil3
var
BYTE U_Ralrm3
var
BYTE I_parOut_000d
var
BYTE I_parThis_000d
var
BYTE I_parOut_000e
var
BYTE I_parThis_000e
var
BYTE I_parOut_000f
var
BYTE I_parThis_000f
con
U_Xbilge4 = 8
var
WORD U_Tdelay4
var
BYTE U_Ralrmsil4
var
BYTE I_parOut_0010
var
BYTE I_parThis_0010
var
BYTE I_parOut_0011
var
BYTE I_parThis_0011
var
BYTE U_Rtextsil4
var
BYTE U_Ralrm4
var
BYTE I_parOut_0012
var
BYTE I_parThis_0012
var
BYTE I_parOut_0013
var
BYTE I_parThis_0013
var
BYTE I_parOut_0014
var
BYTE I_parThis_0014
con
U_Xbilge5 = 9
var
WORD U_Tdelay5
var
BYTE U_Ralrmsil5
var
BYTE I_parOut_0015
var
BYTE I_parThis_0015
var
BYTE I_parOut_0016
var
BYTE I_parThis_0016
var
BYTE U_Rtextsil5
var
BYTE U_Ralrm5
var
BYTE I_parOut_0017
var
BYTE I_parThis_0017
var
BYTE I_parOut_0018
var
BYTE I_parThis_0018
var
BYTE I_parOut_0019
var
BYTE I_parThis_0019
con
U_Xbilge6 = 10
var
WORD U_Tdelay6
var
BYTE U_Ralrmsil6
var
BYTE I_parOut_001a
var
BYTE I_parThis_001a
var
BYTE I_parOut_001b
var
BYTE I_parThis_001b
var
BYTE U_Rtextsil6
var
BYTE U_Ralrm6
var
BYTE I_parOut_001c
var
BYTE I_parThis_001c
var
BYTE I_parOut_001d
var
BYTE I_parThis_001d
var
BYTE I_parOut_001e
var
BYTE I_parThis_001e
con
U_Xbilge7 = 11
var
WORD U_Tdelay7
var
BYTE U_Ralrmsil7
var
BYTE I_parOut_001f
var
BYTE I_parThis_001f
var
BYTE I_parOut_0020
var
BYTE I_parThis_0020
var
BYTE U_Rtextsil7
var
BYTE U_Ralrm7
var
BYTE I_parOut_0021
var
BYTE I_parThis_0021
var
BYTE I_parOut_0022
var
BYTE I_parThis_0022
var
BYTE I_parOut_0023
var
BYTE I_parThis_0023
con
U_Xbilge8 = 12
var
WORD U_Tdelay8
var
BYTE U_Ralrmsil8
var
BYTE I_parOut_0024
var
BYTE I_parThis_0024
var
BYTE I_parOut_0025
var
BYTE I_parThis_0025
var
BYTE U_Rtextsil8
var
BYTE U_Ralrm8
var
BYTE I_parOut_0026
var
BYTE I_parThis_0026
var
BYTE I_parOut_0027
var
BYTE I_parThis_0027
var
BYTE I_parOut_0028
var
BYTE I_parThis_0028
con
U_Xbilge9 = 13
var
WORD U_Tdelay9
var
BYTE U_Ralrmsil9
var
BYTE I_parOut_0029
var
BYTE I_parThis_0029
var
BYTE I_parOut_002a
var
BYTE I_parThis_002a
var
BYTE U_Rtextsil9
var
BYTE U_Ralrm9
var
BYTE I_parOut_002b
var
BYTE I_parThis_002b
var
BYTE I_parOut_002c
var
BYTE I_parThis_002c
var
BYTE I_parOut_002d
var
BYTE I_parThis_002d
var
WORD U_Tdelay10
var
BYTE U_Ralrmsil10
var
BYTE I_parOut_002e
var
BYTE I_parThis_002e
var
BYTE I_parOut_002f
var
BYTE I_parThis_002f
var
BYTE U_Rtextsil10
var
BYTE U_Ralrm10
var
BYTE I_parOut_0030
var
BYTE I_parThis_0030
var
BYTE I_parOut_0031
var
BYTE I_parThis_0031
var
BYTE I_parOut_0032
var
BYTE I_parThis_0032
var
WORD U_Tdelay11
var
BYTE U_Ralrmsil11
var
BYTE I_parOut_0033
var
BYTE I_parThis_0033
var
BYTE I_parOut_0034
var
BYTE I_parThis_0034
var
BYTE U_Rtextsil11
var
BYTE U_Ralrm11
var
BYTE I_parOut_0035
var
BYTE I_parThis_0035
var
BYTE I_parOut_0036
var
BYTE I_parThis_0036
var
BYTE I_parOut_0037
var
BYTE I_parThis_0037
var
WORD U_Tdelay12
var
BYTE U_Ralrmsil12
var
BYTE I_parOut_0038
var
BYTE I_parThis_0038
var
BYTE I_parOut_0039
var
BYTE I_parThis_0039
var
BYTE U_Rtextsil12
var
BYTE U_Ralrm12
var
BYTE I_parOut_003a
var
BYTE I_parThis_003a
var
BYTE I_parOut_003b
var
BYTE I_parThis_003b
var
BYTE I_parOut_003c
var
BYTE I_parThis_003c
var
WORD U_Tdelay13
var
BYTE U_Ralrmsil13
var
BYTE I_parOut_003d
var
BYTE I_parThis_003d
var
BYTE I_parOut_003e
var
BYTE I_parThis_003e
var
BYTE U_Rtextsil13
var
BYTE U_Ralrm13
var
BYTE I_parOut_003f
var
BYTE I_parThis_003f
var
BYTE I_parOut_0040
var
BYTE I_parThis_0040
var
BYTE I_parOut_0041
var
BYTE I_parThis_0041
con
U_Xfaalarm = 14
var
WORD U_Tdelay14
var
BYTE U_Rfahornsil
var
BYTE I_parOut_0042
var
BYTE I_parThis_0042
var
BYTE I_parOut_0043
var
BYTE I_parThis_0043
var
BYTE U_Rtextsil14
var
BYTE U_Ralrm14
var
BYTE I_parOut_0044
var
BYTE I_parThis_0044
var
BYTE I_parOut_0045
var
BYTE I_parThis_0045
con
U_Yfahornsil = 22
var
BYTE I_parOut_0046
var
BYTE I_parThis_0046
con
U_Xfatrouble = 15
var
WORD U_Tdelay15
var
BYTE U_Ralrmsil15
var
BYTE I_parOut_0047
var
BYTE I_parThis_0047
var
WORD U_statvar
var
BYTE U_Ralrm15
var
BYTE I_parOut_0048
var
BYTE I_parThis_0048
var
BYTE I_parOut_0049
var
BYTE I_parThis_0049
con
U_Xportpwrbreaker = 17
con
U_Xportprwloss = 16
var
WORD U_Tdelay16
var
BYTE I_scratch
var
BYTE I_oneShot_0001
var
BYTE I_parOut_004a
var
BYTE I_parThis_004a
var
BYTE I_parOut_004b
var
BYTE I_parThis_004b
var
BYTE U_Ralrml2
var
BYTE U_Ralarm
var
BYTE I_parOut_004c
var
BYTE I_parThis_004c
var
BYTE U_Rflash
var
WORD U_Tflashon
var
BYTE I_Tflashoff_antiglitch
var
WORD U_Tflashoff
con
U_Yalrmbuzzer = 21
var
BYTE I_parOut_004d
var
BYTE I_parThis_004d
con
U_Yalarmlt = 20
var
BYTE I_parOut_004e
var
BYTE I_parThis_004e
con
U_Xresetpb = 18
var
WORD U_resetvar
var
BYTE I_parOut_004f
var
BYTE I_parThis_004f
var
BYTE I_parOut_0050
var
BYTE I_parThis_0050
VAR
LONG stack[100]
LONG cog
PUB Start
cog := cognew(PlcCycle, @stack) +1
PUB Stop
if (cog)
cogstop(cog~ - 1)
cog~
PRI PlcCycle | timing
DIRA := $00700000
DIRB := $00000000
timing := cnt + clkfreq / CycleTime
repeat
I_mcr~~
{ start rung 2 }
I_rung_top := I_mcr
{ start series [ }
{ Negated contact }
if (U_Rpulsebit)
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tfreerun < 9)
U_Tfreerun++
I_rung_top~
else
U_Tfreerun := 0
{ start parallel [ }
I_parOut_0000~
I_parThis_0000 := I_rung_top
{ Normal coil }
U_Rpulsebit := I_parThis_0000
if (I_parThis_0000)
I_parOut_0000~~
I_parThis_0000 := I_rung_top
{ CTC element }
if (I_parThis_0000)
ifnot (I_oneShot_0000)
U_Cshift++
if (U_Cshift < 21)
else
U_Cshift := 0
I_oneShot_0000 := I_parThis_0000
if (I_parThis_0000)
I_parOut_0000~~
I_rung_top := I_parOut_0000
{ ] finish parallel }
{ ] finish series }
{ start rung 4 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge1])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay1 < 299)
U_Tdelay1++
I_rung_top~
else
U_Tdelay1 := 0
{ Negated contact }
if (U_Ralrmsil1)
I_rung_top~
{ start parallel [ }
I_parOut_0001~
I_parThis_0001 := I_rung_top
{ start series [ }
I_scratch2 := 1
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0001~
{ start parallel [ }
I_parOut_0002~
I_parThis_0002 := I_parThis_0001
{ MOVE element }
if (I_parThis_0002)
U_alrmvar := 1
if (I_parThis_0002)
I_parOut_0002~~
I_parThis_0002 := I_parThis_0001
{ start series [ }
{ Negated contact }
if (U_Rtextsil1)
I_parThis_0002~
{ MOVE element }
if (I_parThis_0002)
U_smsvar := 1
{ ] finish series }
if (I_parThis_0002)
I_parOut_0002~~
I_parThis_0001 := I_parOut_0002
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0001)
I_parOut_0001~~
I_parThis_0001 := I_rung_top
{ Normal coil }
U_Ralrm1 := I_parThis_0001
if (I_parThis_0001)
I_parOut_0001~~
I_rung_top := I_parOut_0001
{ ] finish parallel }
{ ] finish series }
{ start rung 5 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0003~
I_parThis_0003 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm1)
I_parThis_0003~
{ start parallel [ }
I_parOut_0004~
I_parThis_0004 := I_parThis_0003
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0004~
if (I_parThis_0004)
I_parOut_0004~~
I_parThis_0004 := I_parThis_0003
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0004~
if (I_parThis_0004)
I_parOut_0004~~
I_parThis_0003 := I_parOut_0004
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0003)
I_parOut_0003~~
I_parThis_0003 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil1)
I_parThis_0003~
if (I_parThis_0003)
I_parOut_0003~~
I_rung_top := I_parOut_0003
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil1 := I_rung_top
{ ] finish series }
{ start rung 6 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0005~
I_parThis_0005 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm1)
I_parThis_0005~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0005~
{ ] finish series }
if (I_parThis_0005)
I_parOut_0005~~
I_parThis_0005 := I_rung_top
{ Contact }
ifnot (U_Rtextsil1)
I_parThis_0005~
if (I_parThis_0005)
I_parOut_0005~~
I_rung_top := I_parOut_0005
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil1 := I_rung_top
{ ] finish series }
{ start rung 8 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge2])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay2 < 299)
U_Tdelay2++
I_rung_top~
else
U_Tdelay2 := 0
{ Negated contact }
if (U_Ralrmsil2)
I_rung_top~
{ start parallel [ }
I_parOut_0006~
I_parThis_0006 := I_rung_top
{ start series [ }
I_scratch2 := 2
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0006~
{ start parallel [ }
I_parOut_0007~
I_parThis_0007 := I_parThis_0006
{ MOVE element }
if (I_parThis_0007)
U_alrmvar := 2
if (I_parThis_0007)
I_parOut_0007~~
I_parThis_0007 := I_parThis_0006
{ start series [ }
{ Negated contact }
if (U_Rtextsil2)
I_parThis_0007~
{ MOVE element }
if (I_parThis_0007)
U_smsvar := 2
{ ] finish series }
if (I_parThis_0007)
I_parOut_0007~~
I_parThis_0006 := I_parOut_0007
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0006)
I_parOut_0006~~
I_parThis_0006 := I_rung_top
{ Normal coil }
U_Ralrm2 := I_parThis_0006
if (I_parThis_0006)
I_parOut_0006~~
I_rung_top := I_parOut_0006
{ ] finish parallel }
{ ] finish series }
{ start rung 9 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0008~
I_parThis_0008 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm2)
I_parThis_0008~
{ start parallel [ }
I_parOut_0009~
I_parThis_0009 := I_parThis_0008
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0009~
if (I_parThis_0009)
I_parOut_0009~~
I_parThis_0009 := I_parThis_0008
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0009~
if (I_parThis_0009)
I_parOut_0009~~
I_parThis_0008 := I_parOut_0009
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0008)
I_parOut_0008~~
I_parThis_0008 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil2)
I_parThis_0008~
if (I_parThis_0008)
I_parOut_0008~~
I_rung_top := I_parOut_0008
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil2 := I_rung_top
{ ] finish series }
{ start rung 10 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_000a~
I_parThis_000a := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm2)
I_parThis_000a~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_000a~
{ ] finish series }
if (I_parThis_000a)
I_parOut_000a~~
I_parThis_000a := I_rung_top
{ Contact }
ifnot (U_Rtextsil2)
I_parThis_000a~
if (I_parThis_000a)
I_parOut_000a~~
I_rung_top := I_parOut_000a
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil2 := I_rung_top
{ ] finish series }
{ start rung 12 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge3])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay3 < 299)
U_Tdelay3++
I_rung_top~
else
U_Tdelay3 := 0
{ Negated contact }
if (U_Ralrmsil3)
I_rung_top~
{ start parallel [ }
I_parOut_000b~
I_parThis_000b := I_rung_top
{ start series [ }
I_scratch2 := 3
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_000b~
{ start parallel [ }
I_parOut_000c~
I_parThis_000c := I_parThis_000b
{ MOVE element }
if (I_parThis_000c)
U_alrmvar := 3
if (I_parThis_000c)
I_parOut_000c~~
I_parThis_000c := I_parThis_000b
{ start series [ }
{ Negated contact }
if (U_Rtextsil3)
I_parThis_000c~
{ MOVE element }
if (I_parThis_000c)
U_smsvar := 3
{ ] finish series }
if (I_parThis_000c)
I_parOut_000c~~
I_parThis_000b := I_parOut_000c
{ ] finish parallel }
{ ] finish series }
if (I_parThis_000b)
I_parOut_000b~~
I_parThis_000b := I_rung_top
{ Normal coil }
U_Ralrm3 := I_parThis_000b
if (I_parThis_000b)
I_parOut_000b~~
I_rung_top := I_parOut_000b
{ ] finish parallel }
{ ] finish series }
{ start rung 13 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_000d~
I_parThis_000d := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm3)
I_parThis_000d~
{ start parallel [ }
I_parOut_000e~
I_parThis_000e := I_parThis_000d
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_000e~
if (I_parThis_000e)
I_parOut_000e~~
I_parThis_000e := I_parThis_000d
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_000e~
if (I_parThis_000e)
I_parOut_000e~~
I_parThis_000d := I_parOut_000e
{ ] finish parallel }
{ ] finish series }
if (I_parThis_000d)
I_parOut_000d~~
I_parThis_000d := I_rung_top
{ Contact }
ifnot (U_Ralrmsil3)
I_parThis_000d~
if (I_parThis_000d)
I_parOut_000d~~
I_rung_top := I_parOut_000d
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil3 := I_rung_top
{ ] finish series }
{ start rung 14 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_000f~
I_parThis_000f := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm3)
I_parThis_000f~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_000f~
{ ] finish series }
if (I_parThis_000f)
I_parOut_000f~~
I_parThis_000f := I_rung_top
{ Contact }
ifnot (U_Rtextsil3)
I_parThis_000f~
if (I_parThis_000f)
I_parOut_000f~~
I_rung_top := I_parOut_000f
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil3 := I_rung_top
{ ] finish series }
{ start rung 16 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge4])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay4 < 299)
U_Tdelay4++
I_rung_top~
else
U_Tdelay4 := 0
{ Negated contact }
if (U_Ralrmsil4)
I_rung_top~
{ start parallel [ }
I_parOut_0010~
I_parThis_0010 := I_rung_top
{ start series [ }
I_scratch2 := 4
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0010~
{ start parallel [ }
I_parOut_0011~
I_parThis_0011 := I_parThis_0010
{ MOVE element }
if (I_parThis_0011)
U_alrmvar := 4
if (I_parThis_0011)
I_parOut_0011~~
I_parThis_0011 := I_parThis_0010
{ start series [ }
{ Negated contact }
if (U_Rtextsil4)
I_parThis_0011~
{ MOVE element }
if (I_parThis_0011)
U_smsvar := 4
{ ] finish series }
if (I_parThis_0011)
I_parOut_0011~~
I_parThis_0010 := I_parOut_0011
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0010)
I_parOut_0010~~
I_parThis_0010 := I_rung_top
{ Normal coil }
U_Ralrm4 := I_parThis_0010
if (I_parThis_0010)
I_parOut_0010~~
I_rung_top := I_parOut_0010
{ ] finish parallel }
{ ] finish series }
{ start rung 17 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0012~
I_parThis_0012 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm4)
I_parThis_0012~
{ start parallel [ }
I_parOut_0013~
I_parThis_0013 := I_parThis_0012
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0013~
if (I_parThis_0013)
I_parOut_0013~~
I_parThis_0013 := I_parThis_0012
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0013~
if (I_parThis_0013)
I_parOut_0013~~
I_parThis_0012 := I_parOut_0013
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0012)
I_parOut_0012~~
I_parThis_0012 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil4)
I_parThis_0012~
if (I_parThis_0012)
I_parOut_0012~~
I_rung_top := I_parOut_0012
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil4 := I_rung_top
{ ] finish series }
{ start rung 18 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0014~
I_parThis_0014 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm4)
I_parThis_0014~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0014~
{ ] finish series }
if (I_parThis_0014)
I_parOut_0014~~
I_parThis_0014 := I_rung_top
{ Contact }
ifnot (U_Rtextsil4)
I_parThis_0014~
if (I_parThis_0014)
I_parOut_0014~~
I_rung_top := I_parOut_0014
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil4 := I_rung_top
{ ] finish series }
{ start rung 20 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge5])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay5 < 299)
U_Tdelay5++
I_rung_top~
else
U_Tdelay5 := 0
{ Negated contact }
if (U_Ralrmsil5)
I_rung_top~
{ start parallel [ }
I_parOut_0015~
I_parThis_0015 := I_rung_top
{ start series [ }
I_scratch2 := 5
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0015~
{ start parallel [ }
I_parOut_0016~
I_parThis_0016 := I_parThis_0015
{ MOVE element }
if (I_parThis_0016)
U_alrmvar := 5
if (I_parThis_0016)
I_parOut_0016~~
I_parThis_0016 := I_parThis_0015
{ start series [ }
{ Negated contact }
if (U_Rtextsil5)
I_parThis_0016~
{ MOVE element }
if (I_parThis_0016)
U_smsvar := 5
{ ] finish series }
if (I_parThis_0016)
I_parOut_0016~~
I_parThis_0015 := I_parOut_0016
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0015)
I_parOut_0015~~
I_parThis_0015 := I_rung_top
{ Normal coil }
U_Ralrm5 := I_parThis_0015
if (I_parThis_0015)
I_parOut_0015~~
I_rung_top := I_parOut_0015
{ ] finish parallel }
{ ] finish series }
{ start rung 21 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0017~
I_parThis_0017 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm5)
I_parThis_0017~
{ start parallel [ }
I_parOut_0018~
I_parThis_0018 := I_parThis_0017
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0018~
if (I_parThis_0018)
I_parOut_0018~~
I_parThis_0018 := I_parThis_0017
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0018~
if (I_parThis_0018)
I_parOut_0018~~
I_parThis_0017 := I_parOut_0018
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0017)
I_parOut_0017~~
I_parThis_0017 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil5)
I_parThis_0017~
if (I_parThis_0017)
I_parOut_0017~~
I_rung_top := I_parOut_0017
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil5 := I_rung_top
{ ] finish series }
{ start rung 22 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0019~
I_parThis_0019 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm5)
I_parThis_0019~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0019~
{ ] finish series }
if (I_parThis_0019)
I_parOut_0019~~
I_parThis_0019 := I_rung_top
{ Contact }
ifnot (U_Rtextsil5)
I_parThis_0019~
if (I_parThis_0019)
I_parOut_0019~~
I_rung_top := I_parOut_0019
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil5 := I_rung_top
{ ] finish series }
{ start rung 24 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge6])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay6 < 299)
U_Tdelay6++
I_rung_top~
else
U_Tdelay6 := 0
{ Negated contact }
if (U_Ralrmsil6)
I_rung_top~
{ start parallel [ }
I_parOut_001a~
I_parThis_001a := I_rung_top
{ start series [ }
I_scratch2 := 6
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_001a~
{ start parallel [ }
I_parOut_001b~
I_parThis_001b := I_parThis_001a
{ MOVE element }
if (I_parThis_001b)
U_alrmvar := 6
if (I_parThis_001b)
I_parOut_001b~~
I_parThis_001b := I_parThis_001a
{ start series [ }
{ Negated contact }
if (U_Rtextsil6)
I_parThis_001b~
{ MOVE element }
if (I_parThis_001b)
U_smsvar := 6
{ ] finish series }
if (I_parThis_001b)
I_parOut_001b~~
I_parThis_001a := I_parOut_001b
{ ] finish parallel }
{ ] finish series }
if (I_parThis_001a)
I_parOut_001a~~
I_parThis_001a := I_rung_top
{ Normal coil }
U_Ralrm6 := I_parThis_001a
if (I_parThis_001a)
I_parOut_001a~~
I_rung_top := I_parOut_001a
{ ] finish parallel }
{ ] finish series }
{ start rung 25 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_001c~
I_parThis_001c := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm6)
I_parThis_001c~
{ start parallel [ }
I_parOut_001d~
I_parThis_001d := I_parThis_001c
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_001d~
if (I_parThis_001d)
I_parOut_001d~~
I_parThis_001d := I_parThis_001c
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_001d~
if (I_parThis_001d)
I_parOut_001d~~
I_parThis_001c := I_parOut_001d
{ ] finish parallel }
{ ] finish series }
if (I_parThis_001c)
I_parOut_001c~~
I_parThis_001c := I_rung_top
{ Contact }
ifnot (U_Ralrmsil6)
I_parThis_001c~
if (I_parThis_001c)
I_parOut_001c~~
I_rung_top := I_parOut_001c
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil6 := I_rung_top
{ ] finish series }
{ start rung 26 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_001e~
I_parThis_001e := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm6)
I_parThis_001e~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_001e~
{ ] finish series }
if (I_parThis_001e)
I_parOut_001e~~
I_parThis_001e := I_rung_top
{ Contact }
ifnot (U_Rtextsil6)
I_parThis_001e~
if (I_parThis_001e)
I_parOut_001e~~
I_rung_top := I_parOut_001e
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil6 := I_rung_top
{ ] finish series }
{ start rung 28 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge7])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay7 < 299)
U_Tdelay7++
I_rung_top~
else
U_Tdelay7 := 0
{ Negated contact }
if (U_Ralrmsil7)
I_rung_top~
{ start parallel [ }
I_parOut_001f~
I_parThis_001f := I_rung_top
{ start series [ }
I_scratch2 := 7
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_001f~
{ start parallel [ }
I_parOut_0020~
I_parThis_0020 := I_parThis_001f
{ MOVE element }
if (I_parThis_0020)
U_alrmvar := 7
if (I_parThis_0020)
I_parOut_0020~~
I_parThis_0020 := I_parThis_001f
{ start series [ }
{ Negated contact }
if (U_Rtextsil7)
I_parThis_0020~
{ MOVE element }
if (I_parThis_0020)
U_smsvar := 7
{ ] finish series }
if (I_parThis_0020)
I_parOut_0020~~
I_parThis_001f := I_parOut_0020
{ ] finish parallel }
{ ] finish series }
if (I_parThis_001f)
I_parOut_001f~~
I_parThis_001f := I_rung_top
{ Normal coil }
U_Ralrm7 := I_parThis_001f
if (I_parThis_001f)
I_parOut_001f~~
I_rung_top := I_parOut_001f
{ ] finish parallel }
{ ] finish series }
{ start rung 29 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0021~
I_parThis_0021 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm7)
I_parThis_0021~
{ start parallel [ }
I_parOut_0022~
I_parThis_0022 := I_parThis_0021
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0022~
if (I_parThis_0022)
I_parOut_0022~~
I_parThis_0022 := I_parThis_0021
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0022~
if (I_parThis_0022)
I_parOut_0022~~
I_parThis_0021 := I_parOut_0022
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0021)
I_parOut_0021~~
I_parThis_0021 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil7)
I_parThis_0021~
if (I_parThis_0021)
I_parOut_0021~~
I_rung_top := I_parOut_0021
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil7 := I_rung_top
{ ] finish series }
{ start rung 30 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0023~
I_parThis_0023 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm7)
I_parThis_0023~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0023~
{ ] finish series }
if (I_parThis_0023)
I_parOut_0023~~
I_parThis_0023 := I_rung_top
{ Contact }
ifnot (U_Rtextsil7)
I_parThis_0023~
if (I_parThis_0023)
I_parOut_0023~~
I_rung_top := I_parOut_0023
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil7 := I_rung_top
{ ] finish series }
{ start rung 32 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge8])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay8 < 299)
U_Tdelay8++
I_rung_top~
else
U_Tdelay8 := 0
{ Negated contact }
if (U_Ralrmsil8)
I_rung_top~
{ start parallel [ }
I_parOut_0024~
I_parThis_0024 := I_rung_top
{ start series [ }
I_scratch2 := 8
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0024~
{ start parallel [ }
I_parOut_0025~
I_parThis_0025 := I_parThis_0024
{ MOVE element }
if (I_parThis_0025)
U_alrmvar := 8
if (I_parThis_0025)
I_parOut_0025~~
I_parThis_0025 := I_parThis_0024
{ start series [ }
{ Negated contact }
if (U_Rtextsil8)
I_parThis_0025~
{ MOVE element }
if (I_parThis_0025)
U_smsvar := 8
{ ] finish series }
if (I_parThis_0025)
I_parOut_0025~~
I_parThis_0024 := I_parOut_0025
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0024)
I_parOut_0024~~
I_parThis_0024 := I_rung_top
{ Normal coil }
U_Ralrm8 := I_parThis_0024
if (I_parThis_0024)
I_parOut_0024~~
I_rung_top := I_parOut_0024
{ ] finish parallel }
{ ] finish series }
{ start rung 33 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0026~
I_parThis_0026 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm8)
I_parThis_0026~
{ start parallel [ }
I_parOut_0027~
I_parThis_0027 := I_parThis_0026
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0027~
if (I_parThis_0027)
I_parOut_0027~~
I_parThis_0027 := I_parThis_0026
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0027~
if (I_parThis_0027)
I_parOut_0027~~
I_parThis_0026 := I_parOut_0027
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0026)
I_parOut_0026~~
I_parThis_0026 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil8)
I_parThis_0026~
if (I_parThis_0026)
I_parOut_0026~~
I_rung_top := I_parOut_0026
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil8 := I_rung_top
{ ] finish series }
{ start rung 34 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0028~
I_parThis_0028 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm8)
I_parThis_0028~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0028~
{ ] finish series }
if (I_parThis_0028)
I_parOut_0028~~
I_parThis_0028 := I_rung_top
{ Contact }
ifnot (U_Rtextsil8)
I_parThis_0028~
if (I_parThis_0028)
I_parOut_0028~~
I_rung_top := I_parOut_0028
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil8 := I_rung_top
{ ] finish series }
{ start rung 36 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xbilge9])
I_rung_top~
{ Negated contact }
if (INA[U_Xacbilgeloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay9 < 299)
U_Tdelay9++
I_rung_top~
else
U_Tdelay9 := 0
{ Negated contact }
if (U_Ralrmsil9)
I_rung_top~
{ start parallel [ }
I_parOut_0029~
I_parThis_0029 := I_rung_top
{ start series [ }
I_scratch2 := 9
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0029~
{ start parallel [ }
I_parOut_002a~
I_parThis_002a := I_parThis_0029
{ MOVE element }
if (I_parThis_002a)
U_alrmvar := 9
if (I_parThis_002a)
I_parOut_002a~~
I_parThis_002a := I_parThis_0029
{ start series [ }
{ Negated contact }
if (U_Rtextsil9)
I_parThis_002a~
{ MOVE element }
if (I_parThis_002a)
U_smsvar := 9
{ ] finish series }
if (I_parThis_002a)
I_parOut_002a~~
I_parThis_0029 := I_parOut_002a
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0029)
I_parOut_0029~~
I_parThis_0029 := I_rung_top
{ Normal coil }
U_Ralrm9 := I_parThis_0029
if (I_parThis_0029)
I_parOut_0029~~
I_rung_top := I_parOut_0029
{ ] finish parallel }
{ ] finish series }
{ start rung 37 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_002b~
I_parThis_002b := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm9)
I_parThis_002b~
{ start parallel [ }
I_parOut_002c~
I_parThis_002c := I_parThis_002b
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_002c~
if (I_parThis_002c)
I_parOut_002c~~
I_parThis_002c := I_parThis_002b
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_002c~
if (I_parThis_002c)
I_parOut_002c~~
I_parThis_002b := I_parOut_002c
{ ] finish parallel }
{ ] finish series }
if (I_parThis_002b)
I_parOut_002b~~
I_parThis_002b := I_rung_top
{ Contact }
ifnot (U_Ralrmsil9)
I_parThis_002b~
if (I_parThis_002b)
I_parOut_002b~~
I_rung_top := I_parOut_002b
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil9 := I_rung_top
{ ] finish series }
{ start rung 38 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_002d~
I_parThis_002d := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm9)
I_parThis_002d~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_002d~
{ ] finish series }
if (I_parThis_002d)
I_parOut_002d~~
I_parThis_002d := I_rung_top
{ Contact }
ifnot (U_Rtextsil9)
I_parThis_002d~
if (I_parThis_002d)
I_parOut_002d~~
I_rung_top := I_parOut_002d
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil9 := I_rung_top
{ ] finish series }
{ start rung 40 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xacbilgeloss])
I_rung_top~
{ Contact }
ifnot (INA[U_Xbilge4])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay10 < 299)
U_Tdelay10++
I_rung_top~
else
U_Tdelay10 := 0
{ Negated contact }
if (U_Ralrmsil10)
I_rung_top~
{ start parallel [ }
I_parOut_002e~
I_parThis_002e := I_rung_top
{ start series [ }
I_scratch2 := 10
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_002e~
{ start parallel [ }
I_parOut_002f~
I_parThis_002f := I_parThis_002e
{ MOVE element }
if (I_parThis_002f)
U_alrmvar := 10
if (I_parThis_002f)
I_parOut_002f~~
I_parThis_002f := I_parThis_002e
{ start series [ }
{ Negated contact }
if (U_Rtextsil10)
I_parThis_002f~
{ MOVE element }
if (I_parThis_002f)
U_smsvar := 10
{ ] finish series }
if (I_parThis_002f)
I_parOut_002f~~
I_parThis_002e := I_parOut_002f
{ ] finish parallel }
{ ] finish series }
if (I_parThis_002e)
I_parOut_002e~~
I_parThis_002e := I_rung_top
{ Normal coil }
U_Ralrm10 := I_parThis_002e
if (I_parThis_002e)
I_parOut_002e~~
I_rung_top := I_parOut_002e
{ ] finish parallel }
{ ] finish series }
{ start rung 41 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0030~
I_parThis_0030 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm10)
I_parThis_0030~
{ start parallel [ }
I_parOut_0031~
I_parThis_0031 := I_parThis_0030
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0031~
if (I_parThis_0031)
I_parOut_0031~~
I_parThis_0031 := I_parThis_0030
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0031~
if (I_parThis_0031)
I_parOut_0031~~
I_parThis_0030 := I_parOut_0031
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0030)
I_parOut_0030~~
I_parThis_0030 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil10)
I_parThis_0030~
if (I_parThis_0030)
I_parOut_0030~~
I_rung_top := I_parOut_0030
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil10 := I_rung_top
{ ] finish series }
{ start rung 42 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0032~
I_parThis_0032 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm10)
I_parThis_0032~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0032~
{ ] finish series }
if (I_parThis_0032)
I_parOut_0032~~
I_parThis_0032 := I_rung_top
{ Contact }
ifnot (U_Rtextsil10)
I_parThis_0032~
if (I_parThis_0032)
I_parOut_0032~~
I_rung_top := I_parOut_0032
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil10 := I_rung_top
{ ] finish series }
{ start rung 44 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xacbilgeloss])
I_rung_top~
{ Contact }
ifnot (INA[U_Xbilge2])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay11 < 9)
U_Tdelay11++
I_rung_top~
else
U_Tdelay11 := 0
{ Negated contact }
if (U_Ralrmsil11)
I_rung_top~
{ start parallel [ }
I_parOut_0033~
I_parThis_0033 := I_rung_top
{ start series [ }
I_scratch2 := 11
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0033~
{ start parallel [ }
I_parOut_0034~
I_parThis_0034 := I_parThis_0033
{ MOVE element }
if (I_parThis_0034)
U_alrmvar := 11
if (I_parThis_0034)
I_parOut_0034~~
I_parThis_0034 := I_parThis_0033
{ start series [ }
{ Negated contact }
if (U_Rtextsil11)
I_parThis_0034~
{ MOVE element }
if (I_parThis_0034)
U_smsvar := 11
{ ] finish series }
if (I_parThis_0034)
I_parOut_0034~~
I_parThis_0033 := I_parOut_0034
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0033)
I_parOut_0033~~
I_parThis_0033 := I_rung_top
{ Normal coil }
U_Ralrm11 := I_parThis_0033
if (I_parThis_0033)
I_parOut_0033~~
I_rung_top := I_parOut_0033
{ ] finish parallel }
{ ] finish series }
{ start rung 45 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0035~
I_parThis_0035 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm11)
I_parThis_0035~
{ start parallel [ }
I_parOut_0036~
I_parThis_0036 := I_parThis_0035
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0036~
if (I_parThis_0036)
I_parOut_0036~~
I_parThis_0036 := I_parThis_0035
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0036~
if (I_parThis_0036)
I_parOut_0036~~
I_parThis_0035 := I_parOut_0036
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0035)
I_parOut_0035~~
I_parThis_0035 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil11)
I_parThis_0035~
if (I_parThis_0035)
I_parOut_0035~~
I_rung_top := I_parOut_0035
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil11 := I_rung_top
{ ] finish series }
{ start rung 46 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0037~
I_parThis_0037 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm11)
I_parThis_0037~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0037~
{ ] finish series }
if (I_parThis_0037)
I_parOut_0037~~
I_parThis_0037 := I_rung_top
{ Contact }
ifnot (U_Rtextsil11)
I_parThis_0037~
if (I_parThis_0037)
I_parOut_0037~~
I_rung_top := I_parOut_0037
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil11 := I_rung_top
{ ] finish series }
{ start rung 48 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xacbilgeloss])
I_rung_top~
{ Contact }
ifnot (INA[U_Xbilge8])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay12 < 11999)
U_Tdelay12++
I_rung_top~
else
U_Tdelay12 := 0
{ Negated contact }
if (U_Ralrmsil12)
I_rung_top~
{ start parallel [ }
I_parOut_0038~
I_parThis_0038 := I_rung_top
{ start series [ }
I_scratch2 := 12
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0038~
{ start parallel [ }
I_parOut_0039~
I_parThis_0039 := I_parThis_0038
{ MOVE element }
if (I_parThis_0039)
U_alrmvar := 12
if (I_parThis_0039)
I_parOut_0039~~
I_parThis_0039 := I_parThis_0038
{ start series [ }
{ Negated contact }
if (U_Rtextsil12)
I_parThis_0039~
{ MOVE element }
if (I_parThis_0039)
U_smsvar := 12
{ ] finish series }
if (I_parThis_0039)
I_parOut_0039~~
I_parThis_0038 := I_parOut_0039
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0038)
I_parOut_0038~~
I_parThis_0038 := I_rung_top
{ Normal coil }
U_Ralrm12 := I_parThis_0038
if (I_parThis_0038)
I_parOut_0038~~
I_rung_top := I_parOut_0038
{ ] finish parallel }
{ ] finish series }
{ start rung 49 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_003a~
I_parThis_003a := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm12)
I_parThis_003a~
{ start parallel [ }
I_parOut_003b~
I_parThis_003b := I_parThis_003a
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_003b~
if (I_parThis_003b)
I_parOut_003b~~
I_parThis_003b := I_parThis_003a
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_003b~
if (I_parThis_003b)
I_parOut_003b~~
I_parThis_003a := I_parOut_003b
{ ] finish parallel }
{ ] finish series }
if (I_parThis_003a)
I_parOut_003a~~
I_parThis_003a := I_rung_top
{ Contact }
ifnot (U_Ralrmsil12)
I_parThis_003a~
if (I_parThis_003a)
I_parOut_003a~~
I_rung_top := I_parOut_003a
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil12 := I_rung_top
{ ] finish series }
{ start rung 50 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_003c~
I_parThis_003c := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm12)
I_parThis_003c~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_003c~
{ ] finish series }
if (I_parThis_003c)
I_parOut_003c~~
I_parThis_003c := I_rung_top
{ Contact }
ifnot (U_Rtextsil12)
I_parThis_003c~
if (I_parThis_003c)
I_parOut_003c~~
I_rung_top := I_parOut_003c
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil12 := I_rung_top
{ ] finish series }
{ start rung 52 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xacbilgeloss])
I_rung_top~
{ Contact }
ifnot (INA[U_Xbilge9])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay13 < 299)
U_Tdelay13++
I_rung_top~
else
U_Tdelay13 := 0
{ Negated contact }
if (U_Ralrmsil13)
I_rung_top~
{ start parallel [ }
I_parOut_003d~
I_parThis_003d := I_rung_top
{ start series [ }
I_scratch2 := 13
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_003d~
{ start parallel [ }
I_parOut_003e~
I_parThis_003e := I_parThis_003d
{ MOVE element }
if (I_parThis_003e)
U_alrmvar := 13
if (I_parThis_003e)
I_parOut_003e~~
I_parThis_003e := I_parThis_003d
{ start series [ }
{ Negated contact }
if (U_Rtextsil13)
I_parThis_003e~
{ MOVE element }
if (I_parThis_003e)
U_smsvar := 13
{ ] finish series }
if (I_parThis_003e)
I_parOut_003e~~
I_parThis_003d := I_parOut_003e
{ ] finish parallel }
{ ] finish series }
if (I_parThis_003d)
I_parOut_003d~~
I_parThis_003d := I_rung_top
{ Normal coil }
U_Ralrm13 := I_parThis_003d
if (I_parThis_003d)
I_parOut_003d~~
I_rung_top := I_parOut_003d
{ ] finish parallel }
{ ] finish series }
{ start rung 53 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_003f~
I_parThis_003f := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm13)
I_parThis_003f~
{ start parallel [ }
I_parOut_0040~
I_parThis_0040 := I_parThis_003f
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0040~
if (I_parThis_0040)
I_parOut_0040~~
I_parThis_0040 := I_parThis_003f
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0040~
if (I_parThis_0040)
I_parOut_0040~~
I_parThis_003f := I_parOut_0040
{ ] finish parallel }
{ ] finish series }
if (I_parThis_003f)
I_parOut_003f~~
I_parThis_003f := I_rung_top
{ Contact }
ifnot (U_Ralrmsil13)
I_parThis_003f~
if (I_parThis_003f)
I_parOut_003f~~
I_rung_top := I_parOut_003f
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil13 := I_rung_top
{ ] finish series }
{ start rung 54 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0041~
I_parThis_0041 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm13)
I_parThis_0041~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0041~
{ ] finish series }
if (I_parThis_0041)
I_parOut_0041~~
I_parThis_0041 := I_rung_top
{ Contact }
ifnot (U_Rtextsil13)
I_parThis_0041~
if (I_parThis_0041)
I_parOut_0041~~
I_rung_top := I_parOut_0041
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil13 := I_rung_top
{ ] finish series }
{ start rung 56 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xfaalarm])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay14 < 9)
U_Tdelay14++
I_rung_top~
else
U_Tdelay14 := 0
{ Negated contact }
if (U_Rfahornsil)
I_rung_top~
{ start parallel [ }
I_parOut_0042~
I_parThis_0042 := I_rung_top
{ start series [ }
I_scratch2 := 14
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0042~
{ start parallel [ }
I_parOut_0043~
I_parThis_0043 := I_parThis_0042
{ MOVE element }
if (I_parThis_0043)
U_alrmvar := 14
if (I_parThis_0043)
I_parOut_0043~~
I_parThis_0043 := I_parThis_0042
{ start series [ }
{ Negated contact }
if (U_Rtextsil14)
I_parThis_0043~
{ MOVE element }
if (I_parThis_0043)
U_smsvar := 14
{ ] finish series }
if (I_parThis_0043)
I_parOut_0043~~
I_parThis_0042 := I_parOut_0043
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0042)
I_parOut_0042~~
I_parThis_0042 := I_rung_top
{ Normal coil }
U_Ralrm14 := I_parThis_0042
if (I_parThis_0042)
I_parOut_0042~~
I_rung_top := I_parOut_0042
{ ] finish parallel }
{ ] finish series }
{ start rung 57 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0044~
I_parThis_0044 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm14)
I_parThis_0044~
{ start parallel [ }
I_parOut_0045~
I_parThis_0045 := I_parThis_0044
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0045~
if (I_parThis_0045)
I_parOut_0045~~
I_parThis_0045 := I_parThis_0044
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0045~
if (I_parThis_0045)
I_parOut_0045~~
I_parThis_0044 := I_parOut_0045
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0044)
I_parOut_0044~~
I_parThis_0044 := I_rung_top
{ Contact }
ifnot (OUTA[U_Yfahornsil])
I_parThis_0044~
if (I_parThis_0044)
I_parOut_0044~~
I_rung_top := I_parOut_0044
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
OUTA[U_Yfahornsil] := I_rung_top
{ ] finish series }
{ start rung 58 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0046~
I_parThis_0046 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm14)
I_parThis_0046~
{ Contact }
ifnot (U_Rtextsil)
I_parThis_0046~
{ ] finish series }
if (I_parThis_0046)
I_parOut_0046~~
I_parThis_0046 := I_rung_top
{ Contact }
ifnot (U_Rtextsil14)
I_parThis_0046~
if (I_parThis_0046)
I_parOut_0046~~
I_rung_top := I_parOut_0046
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Rtextsil14 := I_rung_top
{ ] finish series }
{ start rung 59 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xfatrouble])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay15 < 9)
U_Tdelay15++
I_rung_top~
else
U_Tdelay15 := 0
{ Negated contact }
if (U_Ralrmsil15)
I_rung_top~
{ start parallel [ }
I_parOut_0047~
I_parThis_0047 := I_rung_top
{ start series [ }
I_scratch2 := 15
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_parThis_0047~
{ MOVE element }
if (I_parThis_0047)
U_statvar := 1
{ ] finish series }
if (I_parThis_0047)
I_parOut_0047~~
I_parThis_0047 := I_rung_top
{ Normal coil }
U_Ralrm15 := I_parThis_0047
if (I_parThis_0047)
I_parOut_0047~~
I_rung_top := I_parOut_0047
{ ] finish parallel }
{ ] finish series }
{ start rung 60 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_0048~
I_parThis_0048 := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm15)
I_parThis_0048~
{ start parallel [ }
I_parOut_0049~
I_parThis_0049 := I_parThis_0048
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_0049~
if (I_parThis_0049)
I_parOut_0049~~
I_parThis_0049 := I_parThis_0048
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_0049~
if (I_parThis_0049)
I_parOut_0049~~
I_parThis_0048 := I_parOut_0049
{ ] finish parallel }
{ ] finish series }
if (I_parThis_0048)
I_parOut_0048~~
I_parThis_0048 := I_rung_top
{ Contact }
ifnot (U_Ralrmsil15)
I_parThis_0048~
if (I_parThis_0048)
I_parOut_0048~~
I_rung_top := I_parOut_0048
{ ] finish parallel }
{ Negated contact }
if (U_Rsysreset)
I_rung_top~
{ Normal coil }
U_Ralrmsil15 := I_rung_top
{ ] finish series }
{ start rung 62 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xportpwrbreaker])
I_rung_top~
I_scratch2 := 16
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_rung_top~
{ MOVE element }
if (I_rung_top)
U_statvar := 2
{ ] finish series }
{ start rung 63 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xportprwloss])
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tdelay16 < 11999)
U_Tdelay16++
I_rung_top~
else
U_Tdelay16 := 0
I_scratch2 := 17
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_rung_top~
{ MOVE element }
if (I_rung_top)
U_statvar := 3
{ ] finish series }
{ start rung 64 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (INA[U_Xacbilgeloss])
I_rung_top~
I_scratch2 := 18
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_rung_top~
{ MOVE element }
if (I_rung_top)
U_statvar := 4
{ ] finish series }
{ start rung 66 }
I_rung_top := I_mcr
{ start series [ }
I_scratch2 := 19
{ EQU element }
if (U_Cshift == I_scratch2)
else
I_rung_top~
I_scratch2 := 1
{ GEQ element }
if (I_scratch2 > U_smsvar)
I_rung_top~
{ OSR element }
I_scratch := I_rung_top
if (I_oneShot_0001)
I_rung_top~
I_oneShot_0001 := I_scratch
{ start parallel [ }
I_parOut_004a~
I_parThis_004a := I_rung_top
{ Normal coil }
U_Rtextsil := I_parThis_004a
if (I_parThis_004a)
I_parOut_004a~~
I_parThis_004a := I_rung_top
{ MOVE element }
if (I_parThis_004a)
U_smsvar := 0
if (I_parThis_004a)
I_parOut_004a~~
I_rung_top := I_parOut_004a
{ ] finish parallel }
{ ] finish series }
{ start rung 68 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_004b~
I_parThis_004b := I_rung_top
{ Contact }
ifnot (U_Ralrm1)
I_parThis_004b~
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ Contact }
ifnot (U_Ralrm4)
I_parThis_004b~
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ Contact }
ifnot (U_Ralrm5)
I_parThis_004b~
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ Contact }
ifnot (U_Ralrm9)
I_parThis_004b~
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ Contact }
ifnot (U_Ralrm10)
I_parThis_004b~
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ Contact }
ifnot (U_Ralrm11)
I_parThis_004b~
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ Contact }
ifnot (U_Ralrm12)
I_parThis_004b~
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ Contact }
ifnot (U_Ralrm13)
I_parThis_004b~
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrml2)
I_parThis_004b~
{ Contact }
ifnot (U_Ralrm3)
I_parThis_004b~
{ ] finish series }
if (I_parThis_004b)
I_parOut_004b~~
I_parThis_004b := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralrm6)
I_parThis_004b~
{ Contact }
ifnot (U_Ralrm7)
I_parThis_004b~
{ Contact }
ifnot (U_Ralrm8)
I_parThis_004b~
{ ] finish series }
if (I_parThis_004b)
I_parOut_004b~~
I_rung_top := I_parOut_004b
{ ] finish parallel }
{ Set only coil }
if (I_rung_top)
U_Ralarm~~
{ ] finish series }
{ start rung 69 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (U_Ralarm)
I_rung_top~
{ start parallel [ }
I_parOut_004c~
I_parThis_004c := I_rung_top
{ Contact }
ifnot (INA[U_Xsilencepb])
I_parThis_004c~
if (I_parThis_004c)
I_parOut_004c~~
I_parThis_004c := I_rung_top
I_scratch2 := 1
{ EQU element }
if (U_silvar == I_scratch2)
else
I_parThis_004c~
if (I_parThis_004c)
I_parOut_004c~~
I_rung_top := I_parOut_004c
{ ] finish parallel }
{ Reset only coil }
if (I_rung_top)
U_Ralarm~
{ ] finish series }
{ start rung 70 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (U_Ralarm)
I_rung_top~
{ Negated contact }
if (U_Rflash)
I_rung_top~
{ TON element }
if (I_rung_top)
if (U_Tflashon < 99)
U_Tflashon++
I_rung_top~
else
U_Tflashon := 0
{ TOFF element }
ifnot (I_Tflashoff_antiglitch)
U_Tflashoff := 99
I_Tflashoff_antiglitch~~
ifnot (I_rung_top)
if (U_Tflashoff < 99)
U_Tflashoff++
I_rung_top~~
else
U_Tflashoff := 0
{ Normal coil }
U_Rflash := I_rung_top
{ ] finish series }
{ start rung 71 }
I_rung_top := I_mcr
{ start series [ }
{ Contact }
ifnot (U_Rflash)
I_rung_top~
{ Normal coil }
OUTA[U_Yalrmbuzzer] := I_rung_top
{ ] finish series }
{ start rung 72 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_004d~
I_parThis_004d := I_rung_top
{ start series [ }
{ Contact }
ifnot (U_Ralarm)
I_parThis_004d~
{ Contact }
ifnot (U_Rflash)
I_parThis_004d~
{ ] finish series }
if (I_parThis_004d)
I_parOut_004d~~
I_parThis_004d := I_rung_top
{ start series [ }
{ Negated contact }
if (U_Ralarm)
I_parThis_004d~
I_scratch2 := 1
{ GEQ element }
if (I_scratch2 > U_alrmvar)
I_parThis_004d~
{ ] finish series }
if (I_parThis_004d)
I_parOut_004d~~
I_rung_top := I_parOut_004d
{ ] finish parallel }
{ Normal coil }
OUTA[U_Yalarmlt] := I_rung_top
{ ] finish series }
{ start rung 74 }
I_rung_top := I_mcr
{ start series [ }
{ start parallel [ }
I_parOut_004e~
I_parThis_004e := I_rung_top
{ Contact }
ifnot (INA[U_Xresetpb])
I_parThis_004e~
if (I_parThis_004e)
I_parOut_004e~~
I_parThis_004e := I_rung_top
I_scratch2 := 1
{ EQU element }
if (U_resetvar == I_scratch2)
else
I_parThis_004e~
if (I_parThis_004e)
I_parOut_004e~~
I_rung_top := I_parOut_004e
If all the code is running in a single Propeller, which sounds like the case, then simply expose the member in getters and setters, pass the word by value, or use a pointer to reference to the word value. This concept is covered extensively in the Propeller manual. If you are sending the word over serial com then yes the bytes come in one at a time. Usually high byte first.
Level translation (shifter) means that the signal amplitude is converted from on level to another. For example, 0-5V to 0-3.3V.
Not sure... That's up to you and your design. It's more like an out-of-the-box available option.
I also started on the top object file and noticed a minor codding problem, that I am having problems fixing. When I compile the program, I am getting this error message "Expected end of line" for this ":" in my part of my code I try even try this as well and it doesn't work:blank:
Here is my top object code for everyone to look it. I used the Simple_Serial object, which is going to be used for bi-directional serial for the RSS485 chip and the Spinneret. Here is the method for the RX part of the Simple_Serial object where the error being generated at So, is what is causing this error and now it's not the Simple Serial object. Because I compile it and compiles with no errors.
The PE manual has excellent Method, COGs, and Objects explanations in chapters 5, and 6
I really hope Mike Green sees this post and chimes in, Mike had a knack for explaining this stuff.
Brace yourself... the problem is your understanding of SPIN and SPIN objects.
The "ZuniTam Monitoring System" object does not expose (make visible) its members. That means the test code can not see the VARs in "ZuniTam Monitoring System".
The "Propeller Education Kit Labs-Fundamentals" covers objects in chapters 5 and 6 and can be found in the help drop down of the Propeller tool.
I noticed a possible problem with the "ZuniTam Monitoring System" object when looking it over yesterday afternoon and why it does not see the VARs. The "ZuniTam Monitoring System" object was compiled with a PRI method instead of a PUB method. I learned this from the Propeller Tool help file and my book called "Programming and Customizing the Multicore Propeller microcontroller. I think this was causing my problem.
Problem: At run time COG 0 runs out of code at pst.Start. Main is never called. However, the "ZuniTam Monitoring System" is running in COG 1.
Problem: U_Xbilge1 and U_alrmvar are uninitialized when PUB BilgeAlarm_1 is invoked. Since the scope of U_Xbilge1 and U_alrmvar are within BilgeAlarm, U_Xbilge1 and U_alrmvar are always 0. None of the PUBs in the "Test" code will send data to the terminal because the variables are local to the PUB and never initialized.
In "ZuniTam Monitoring System" you have
I believe you want to evaluate U_alrmvar stored in "ZuniTam Monitoring System" from your "Test" code. I'm not sure because there are no comments in your code that describe what's going on. If you want the ability to see U_alrmvar in the top "Test" object then you must expose the VAR through a method or drop U_alrmvar in a DAT section and reference U_alrmvar with a pointer. The following code example exposes U_alrmvar with a method in "ZuniTam Monitoring System"
Now U_alrmvar is visible to the top "Test" object by...
I don't know if you cracked open chapter 5 and 6 in "Propeller Education Kit Labs-Fundamentals". Chapters 5 and 6 explains in detail the constructs explained above.
So, what do you think will take care of this problem?
The generated code is fine. You just need to tweak it a bit. But first, you must educate yourself in SPIN methods and objects.
Thanks again for your support in my project.
I said the ZuniTam Monitoring System object is fine. I should have said, the code runs but I don't know if the results are what you expect. There seems to be a lot of cryptic code for monitoring I/O.
The following attachments are the
1. Project Report
Shortcut to Zunitam Web Based Monitoring System.pdf
2. I/O Controller code
ZuniTam Monitoring System Ver2.spin
3. Spinneret/HTML code
ZuniTam Monitoring System Web Server Test v1.2.spin
As, I write this me the other member of are group are still working on and testing the final Spinneret/HTML code that will be used in are application. But, I was asked to submit something for the contest anyway by the judges of the contest, so they can judge it anyway.
FYI - Here is the end code for our ship monitoring...
Not a bad program that you did and just finished looking it over after coming home from overnight maintenance job.
BTW, For those wondering about the status of my project. We are in a location where it is hard for our volunteers to access the ship, which has made it hard for us to get on the ship to install the monitoring system on board and test it. We hoping to get a spot that is near are current location to tie up and this will us allow better access for members and guests to board the ship safely.
Right now we need to raise $40,000 to make the needed repairs to the hull of our ship and we started a fundraiser on this fundraiser site http://www.razoo.com/story/Help-Save-And-Restore-The-Uss-Zuni-Atf-95-Usgc-Tamaroa-Wmec-166. For those, who are interested in saving a ship with two histories, one that earn her 4 battle stars in the South Pacific in WWII and the other assisted the rescue of the three crewmembers aboard the sailboat Satori during the Perfect Storm in 1991, which latter became a film with the same name.
I would love to see this project completed and see the ship saved for future generations since this is the last chance to save her.
BTW, when you visit the fundraiser site that I started today, there is no video. But, one will be posted and you guys will really like it due to who is narrating it. I will reveal who this person later on