You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old October 23rd, 2021, 07:22 AM   #16
m_turk
Member
Croatia

m_turk is offline
 
Join Date: Jan 2008
Location: ZG
Posts: 249
Quote:
Originally Posted by Lare View Post
You probably meaned to write
"But it doesn't for MB_server anymore so I guess it is the same with MB_Client."





As MB_Master is same than MB_client and MB_Server is same than slave.
No. MB master is the same as MB client, like you say. So I think it works the same on same instructions for TCP and RTU..
  Reply With Quote
Old October 23rd, 2021, 07:28 AM   #17
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,727
Quote:
Originally Posted by m_turk View Post
No. MB master is the same as MB client, like you say. So I think it works the same on same instructions for TCP and RTU..



OK




As a Side note some manufactures don't use slave and master anymore for RTU as it can hurt someone's feelings.

I allways confuse which one server and client is meaning on communication thought.
  Reply With Quote
Old October 23rd, 2021, 07:36 AM   #18
m_turk
Member
Croatia

m_turk is offline
 
Join Date: Jan 2008
Location: ZG
Posts: 249
Quote:
Originally Posted by Lare View Post
As a Side note some manufactures don't use slave and master anymore for RTU as it can hurt someone's feelings.

I allways confuse which one server and client is meaning on communication thought.


So no robot slaves in the future...

The Client is always right, so he is the Master, and the Server brings you what you need, but you'll tip him so it is not slavery..


For the topics sake, let us just agree that he should go with clock_1s -|P|- on the REQ input, and it should work.
  Reply With Quote
Old October 26th, 2021, 09:28 AM   #19
bb76
Member
United Kingdom

bb76 is offline
 
Join Date: Oct 2020
Location: UK
Posts: 23
I had already tried messing with a timer, though never used r trig. Tried that this morning but still the same issue. So I've used varying times up to 5 sec, a constant 1, r trig etc, all give the same problem.

If you go into the MB Client db and monitor you can see in the temp data area that the values I expect to see are being read as they change. The values (int) I expect to see however in the temp data area are split into two bytes. The expected values are 0-100 so one byte is zero and the other shows the value. The first value shows correctly for maybe half a second, then the other byte shows an unexpected value and the 'correct' byte shows zero. Whenever the correct value shows, the data is transferred to my db, otherwise all zeroes are written to my db even though the correct values are showing for the remaining 23 registers in the temp data area. Does that make sense?
  Reply With Quote
Old October 26th, 2021, 11:22 AM   #20
m_turk
Member
Croatia

m_turk is offline
 
Join Date: Jan 2008
Location: ZG
Posts: 249
I don't really understand you 100%..
I think the simulator might not be working as intended.. But I just noticed you created some #mb_data_pointer, not sure what is there.. You should just put your Array instead..
The byte swap, if it exists because of the Endianness you can solve with SWAP, READ_BIG, READ_LITTLE instructions. But, you have to get some stable data first..
Also, create some simple debugging..

Try this the thing in attachments..

Now see if you are getting the same stuff in buffer and data, how many errors vs good data are you getting and what are the errors..
Attached Images
File Type: png mb1.PNG (24.2 KB, 4 views)
File Type: png mb2.PNG (36.1 KB, 4 views)
  Reply With Quote
Old October 26th, 2021, 01:23 PM   #21
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,727
if you have located #data_pointer to FC or FB temp area then it is only valid for one program scan and only when your MB_client done bit is "true".


Locate your MB_data_area to independent DB-block instead of temp.
Attached Images
File Type: jpeg image2.jpeg (141.6 KB, 23 views)
  Reply With Quote
Old October 27th, 2021, 07:52 AM   #22
bb76
Member
United Kingdom

bb76 is offline
 
Join Date: Oct 2020
Location: UK
Posts: 23
Quote:
Originally Posted by Lare View Post
if you have located #data_pointer to FC or FB temp area then it is only valid for one program scan and only when your MB_client done bit is "true".


Locate your MB_data_area to independent DB-block instead of temp.
Thanks Lare! This was the issue.
  Reply With Quote
Old October 27th, 2021, 03:19 PM   #23
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,727
Quote:
Originally Posted by bb76 View Post
Thanks Lare! This was the issue.


Yeah, everyone have had same mistake with siemens sometimes.


Use temp area only if you first write to temp and later on same program scan read same temp variable. On another program scan data is carbage and overwritten from other FC and FB blocks.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Issue Changing IP on TP700 (WinCC / TIA Portal v14) kdcui LIVE PLC Questions And Answers 8 October 8th, 2019 03:28 PM
How to upload Siemens TIA v10.5 if I have just TIA 11 / TIA 12 lefarias LIVE PLC Questions And Answers 13 June 17th, 2019 08:50 PM
TIA V15 install issue putiss LIVE PLC Questions And Answers 2 July 18th, 2018 09:49 AM
TIA V13 SP1 keeps crashing!! Traloch LIVE PLC Questions And Answers 2 September 21st, 2015 11:11 AM
TIA Portal and SFB52/53 Michal_dk LIVE PLC Questions And Answers 1 June 15th, 2015 06:55 AM


All times are GMT -4. The time now is 07:54 PM.


.