TP177B + S7-300 on Profibus: No output

happyhippo

Member
Join Date
May 2008
Location
Netherlands
Posts
13
Hey,

I have a TP177B PN/DP and a S7-300 (323-2 DP). For my project I need to connect them and let them communicate via Profibus. Making the program for the TP177B and the S7 isn't really a problem. The only problem I have is that the output on my S7 won't be high (1).

My testconfiguration:

I made a button on my TP177B that activates M0.0 (SetBit). On my S7 program I have this:

Code:
A M0.0
= Q0.0

so the output should be high, softwarematicly and on the PLC. When I set everything up with Profibus and test it, I see that when I push the button, M0.0 (and ofcourse Q0.0) are green (in my S7 program), meaning that M0.0 is high, and Q0.0 should be high (on the PLC). Softwarematicly everything works and Q0.0 is high, but the output isn't high on my PLC.

Some extra info about my program:

Code:
ORGANIZATION_BLOCK OB 1
TITLE = "Main Program Sweep (Cycle)"
VERSION : 0.1
 
VAR_TEMP
OB1_EV_CLASS : BYTE ; //Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event class 1)
OB1_SCAN_1 : BYTE ; //1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB 1)
OB1_PRIORITY : BYTE ; //Priority of OB Execution
OB1_OB_NUMBR : BYTE ; //1 (Organization block 1, OB1)
OB1_RESERVED_1 : BYTE ; //Reserved for system
OB1_RESERVED_2 : BYTE ; //Reserved for system
OB1_PREV_CYCLE : INT ; //Cycle time of previous OB1 scan (milliseconds)
OB1_MIN_CYCLE : INT ; //Minimum cycle time of OB1 (milliseconds)
OB1_MAX_CYCLE : INT ; //Maximum cycle time of OB1 (milliseconds)
OB1_DATE_TIME : DATE_AND_TIME ; //Date and time OB1 started
END_VAR
BEGIN
NETWORK
TITLE =
	 A	 M	 0.0; 
	 =	 Q	 0.0; 
 
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB 82
TITLE = "I/O Point Fault"
VERSION : 0.1
 
VAR_TEMP
OB82_EV_CLASS : BYTE ; //16#39, Event class 3, Entering event state, Internal fault event
OB82_FLT_ID : BYTE ; //16#XX, Fault identifcation code
OB82_PRIORITY : BYTE ; //Priority of OB Execution
OB82_OB_NUMBR : BYTE ; //82 (Organization block 82, OB82)
OB82_RESERVED_1 : BYTE ; //Reserved for system
OB82_IO_FLAG : BYTE ; //Input (01010100), Output (01010101)
OB82_MDL_ADDR : WORD ; //Base address of module with fault
OB82_MDL_DEFECT : BOOL ; //Module defective
OB82_INT_FAULT : BOOL ; //Internal fault
OB82_EXT_FAULT : BOOL ; //External fault
OB82_PNT_INFO : BOOL ; //Point information
OB82_EXT_VOLTAGE : BOOL ; //External voltage low
OB82_FLD_CONNCTR : BOOL ; //Field wiring connector missing
OB82_NO_CONFIG : BOOL ; //Module has no configuration data
OB82_CONFIG_ERR : BOOL ; //Module has configuration error
OB82_MDL_TYPE : BYTE ; //Type of module
OB82_SUB_MDL_ERR : BOOL ; //Sub-Module is missing or has error
OB82_COMM_FAULT : BOOL ; //Communication fault
OB82_MDL_STOP : BOOL ; //Module is stopped
OB82_WTCH_DOG_FLT : BOOL ; //Watch dog timer stopped module
OB82_INT_PS_FLT : BOOL ; //Internal power supply fault
OB82_PRIM_BATT_FLT : BOOL ; //Primary battery is in fault
OB82_BCKUP_BATT_FLT : BOOL ; //Backup battery is in fault
OB82_RESERVED_2 : BOOL ; //Reserved for system
OB82_RACK_FLT : BOOL ; //Rack fault, only for bus interface module
OB82_PROC_FLT : BOOL ; //Processor fault
OB82_EPROM_FLT : BOOL ; //EPROM fault
OB82_RAM_FLT : BOOL ; //RAM fault
OB82_ADU_FLT : BOOL ; //ADU fault
OB82_FUSE_FLT : BOOL ; //Fuse fault
OB82_HW_INTR_FLT : BOOL ; //Hardware interupt input in fault
OB82_RESERVED_3 : BOOL ; //Reserved for system 
OB82_DATE_TIME : DATE_AND_TIME ; //Date and time OB82 started 
END_VAR
BEGIN
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB 85
TITLE = "Organization Block (OB) Not Loaded Fault"
VERSION : 0.1
 
VAR_TEMP
OB85_EV_CLASS : BYTE ; //16#35 Event class 3
OB85_FLT_ID : BYTE ; //16#XX, Fault identification code
OB85_PRIORITY : BYTE ; //Priority of OB Execution
OB85_OB_NUMBR : BYTE ; //85 (Organization block 85, OB85)
OB85_RESERVED_1 : BYTE ; //Reserved for system
OB85_RESERVED_2 : BYTE ; //Reserved for system
OB85_RESERVED_3 : INT ; //Reserved for system
OB85_ERR_EV_CLASS : BYTE ; //Class of event causing error
OB85_ERR_EV_NUM : BYTE ; //Number of event causing error
OB85_OB_PRIOR : BYTE ; //Priority of OB causing error
OB85_OB_NUM : BYTE ; //Number of OB causing error
OB85_DATE_TIME : DATE_AND_TIME ; //Date and time OB85 started 
END_VAR
BEGIN
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB 86
TITLE = "Loss Of Rack Fault"
VERSION : 0.1
 
VAR_TEMP
OB86_EV_CLASS : BYTE ; //16#38/39 Event class 3
OB86_FLT_ID : BYTE ; //16#C1/C4/C5, Fault identifcation code
OB86_PRIORITY : BYTE ; //Priority of OB Execution
OB86_OB_NUMBR : BYTE ; //86 (Organization block 86, OB86)
OB86_RESERVED_1 : BYTE ; //Reserved for system
OB86_RESERVED_2 : BYTE ; //Reserved for system
OB86_MDL_ADDR : WORD ; //Base address of IM module in rack with fault
OB86_RACKS_FLTD : ARRAY [0 .. 31 ] OF BOOL ; //Racks in fault
OB86_DATE_TIME : DATE_AND_TIME ; //Date and time OB86 started
END_VAR
BEGIN
END_ORGANIZATION_BLOCK

wincczi8.jpg

hwconfighu7.jpg

progiq9.jpg


I have tried every output, and not one is actually making the output on my PLC high.

I hope you can help me, my project needs to be finished in 2 weeks and this is the only thing that is stopping me from completing my project.

Kind regards,
happyhippo
 
Last edited:
How is the output wired ? - the LED needs an outside supply to function. Check the circuit diagram of your output module to confirm.

(How do you know when a hippo is happy ?)
 
The outputs work like they have to. If I load an other program (created with New Project Wizard, without changing anything to HW config), the output is high when it needs to be, also on the PLC. When I try my program with the TP177B and Profibusnetwork, everything works on my laptop but not on the PLC..


(A hippo is happy when the output on the PLC is high)
 
[QUOTE='L D[AR2,P#0.0]How do you know when a hippo is happy ?[/QUOTE]

When they're singing?

(sorry for that)
 
Yes, CPU is in run. Lol. When I run, the green Run light blinks, SF led goes on, Stop led goes off, then SF led goes off and the green Run led stays on.

Forcing the output doesn't seem to work either.. can you tell me exactly how to do it? I see in my VAT that Q1.0 is high (I made a testprogram to make Q0.0, Q1.0, Q4.0, Q124.0 and Q125.0 high to test), but it doesn't get high on the PLC..
 
If forcing does not work, then there is something wrong with the output card. Maybe the wiring, maybe the card is defective.

Try to change the program to use Q4.0 in stead of Q0.0
edit: I see that you have tried that already.
Well I dont know anything else that can explain it.

But you also say that a sample program works OK.
Hmm. Try it again, and if it still works OK, use the sample program as template for further program work.
 
Last edited:
The output module works fine. I have a simple testprogram to set all the outputs on the module, and that works. When I download my program (whole program, not just the blocks) the outputs stay low.

HMI is the 'only master in the bus'. I have tried to uncheck that too but then still my output stays 0.

Can you explain how to force outputs so I can try that again?
 
Do a memory reset, delete OB1 from the offline program, insert a new OB1 and try again.

I've seen some weird stuff with S7.......Your problem rings a bell.

Have had issues with blocks not doing what they are supposed to be doing. Ctrl+a, ctrl+c, delete block, insert new block, ctrl+v, save, download and then it worked.....

Also wondering why you have 2 connections in WinCC Flex.
Also noticed that the Highest Station Address for the Profibus connection is 126.
If I recall correctly, the TP177B only accepts networks going up to 63. (Have had problems with this before) Might wanna check that in the manual aswell.
(HSA can be changed using NetPro)

Fun stuff this...:D

Edit: To Force, you need to create a VAT, in this VAT go to Variable, then select Display Force Variables.

This will open up a new window within the VAT where you can enter inputs/outputs to be forced.

Once variables are enterd, enter the value for which you want to force them, then go to Variables > Force. When done, select Stop Forcing.
 
Last edited:
Forcing fails. Outputs are high in my testprogram, but stay low in my Profibus program.

I have 1 conenction now (CPU313C-2 DP, deleted the other a while ago but still doesn't work). HSA is 126, also in the configration on the TP177B.

I have chosen to integrate my project into the WinCC Flexible program, so I could use tags from the Symbol list.. shouldn't be a problem either.

I'll try the ctrl-part.. hehe. I'm near desperate.. I have tried so many things and nothing works..

Got any other ideas what can help?
 
Doesn't work. If I delete the device and the profibusnetwork, the output stays low too.

If I download my other testprogram (not Profibus-related), the outputs are high..
 
The i/o that you are using to test is in the local rack. So both the Profibus network and the TP177B should have no influence on that the output goes on or off, as long as you can see the output going on when online with STEP7.

Btw. when forcing you have to setup the adresses to force, what force values they must be set to, and activate the forcing. Have you done all these steps ?

I would like to see a screenshot of the Force VAT - with Q0.0, Q4.0 and Q124.0 forced TRUE. I have a feeling that something is wrong with your understanding how STEP7 works (no offense meant).
 
forceai1.jpg

progmd3.jpg



The orange LED on the CPU (FRCE) is lighted too. Outputs stay 0.

Maybe a stupid idea, but I keep thinking about this: PLC is Profibus Master. On the HMI device and in the WinCC program, I see that the HMI is "the only master on the bus". I have tried forcing the values with only the PLC, HMI is disconnected..

Btw, I can do whatever I want to, but I cannot force Q0.0. I can only make it high by pushing the button on my HMI.
 

Similar Topics

Hi everyone I'm having trouble transfering a projec from my PC(wincc Flex 2008 sp2 Win7) to an HMI simatic panel(tp177b pn/dp 6"cstn). I 've...
Replies
4
Views
3,527
Hello, as you might know, the TP177B is no longer in production. However, we do have a lot of them in our machines, so some spares would come in...
Replies
19
Views
4,953
hello dear all. As a project the customer ask me to translate all texts to persian but the panel TP177B COLOR PN/DP shows squares instead of the...
Replies
2
Views
1,300
Dear all, We have two machines and we have the same sytem running on the both, and TP177B 6" color HMI is installed on both, one of them got some...
Replies
6
Views
2,522
hello i have system with cpu315f DP and HMI TP177B DP 6 inch it`s first time to make configuration for hmi with s7300 so i have some questions...
Replies
3
Views
1,496
Back
Top Bottom