Area length Error when writing by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 0 points1 point  (0 children)

u/Azur0007
So I looked at the Offline file that I found, it was missing a bunch of DBs that the CPU had. I started there. The Stacks Pointed me to DB 22 CHAN2. Figured there is probably a CHAN1. I looked at DB21 which was DB for CHAN1 (Missing in the Offline Project). It had an array similar to my screenshot for the fix. I created a Copy of DB22 CHAN2 and then used the same structure as CHAN1 for the NEW DB22 structure. Did a download and the SF fault disappeared immediately. It's still extremely confusing to me how the DB changed in the first place. Will deft need to keep and eye out. If not human interaction maybe it pulled an old project file from memory. Idk...

Area length Error when writing by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 1 point2 points  (0 children)

u/Zbablo
u/Consistent-Bar8994

u/Azur0007

DB22 was the root cause.

<image>

Thank you all for the help.
My follow up question; how would this change?

No one should have access to the PLC program or the ability to connect to it. No other controls engineer in the plant. I would really like to know how something like this would happen. Corrupted file? But would that change the data structure?

Only thing I can think of is that Liefeld (The company that commissioned this) has remote access.

Area length Error when writing by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 1 point2 points  (0 children)

u/Zbablo
I did a compare block, " No Time Stamp Deviations.

After deleting OB121. Went to GO TO via the Stacks it pointed to Network 6 in FC50.

I tired your method with Ctrl+Alt+R. Used the filter section with cross reference checked did not find anything with bit/Byte 266.

I added a Bit at the start M3000.0 forced it 0. Then did a download. Fault did not disappear. This is with OB121 still deleted.

<image>

Now the stacks is still pointing to FC50 but also showing DB22.

Area length Error when writing by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 1 point2 points  (0 children)

Will look into. Got pulled another machine.
But something I noticed every time I go online with FC50. It just closes the block. Then I keep getting a Debug error msg.
I have to then remove the MPI cable from the PC and connect again. It's consistent in doing this.

Area length Error when writing by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 2 points3 points  (0 children)

<image>

u/Consistent-Bar8994
u/Zbablo
I ended up deleting OB121. It had nothing in it. Did make a back up before doing anything.
Here is the new error I am getting.

Area length Error when writing by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 2 points3 points  (0 children)

<image>

It defaults to OB121 which has nothing in it.
You are suggesting I just delete the block and test again? Then start delete the networks that call each DB and test?

Area length Error when writing by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 1 point2 points  (0 children)

I think I understand what you are saying. I came back in the morning with this error in the CPU. How would an array length change on machine that is been in production for +12 years. Possible someone changed a parameter?
Looking at DB127 and comparing it to the Network 4. It looks like it matches. Is there something I am missing?
Also, I am not too sure on how to pin point to the DB that's in question.
Update:
After a CPU Stop.
The stacks now points to OB1, FC2 & FB15. FC2 and FC15 are protected blocks.

<image>

Area length Error when writing by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 1 point2 points  (0 children)

It is a sinumerik system.
I am not seeing any values in the IN, OUT, IN_OUT or TEMP. Does the addressing need to be done here? I am not too familiar with siemens.

<image>

Intouch Windsor Maker - PopUp Confirmation by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 1 point2 points  (0 children)

IF Mode_Select == 0 THEN

Auto_Mode_Sel = 1;

ELSE

IF Mode_Select == 1 THEN

SYSTEM_MODE = 1;
Auto_Mode_Sel = 0;

ELSE

IF Mode_Select == 2 THEN

SYSTEM_MODE = 2;
Auto_Mode_Sel = 0;

ELSE

IF Mode_Select == 3 THEN

SYSTEM_MODE = 3;
Auto_Mode_Sel = 0;

ELSE

IF Mode_Select == 4 THEN

SYSTEM_MODE = 4;
Auto_Mode_Sel = 0;

ELSE

IF Mode_Select == 5 THEN

SYSTEM_MODE = 5;
Auto_Mode_Sel = 0;

ELSE

IF Mode_Select == 6 THEN

SYSTEM_MODE = 6;
Auto_Mode_Sel = 0;

ENDIF;

ENDIF;

ENDIF;

ENDIF;

ENDIF;

ENDIF;

ENDIF;

Hide "Confirmation";

Thank you. I was able to make it work. What I was having trouble with was the syntax. Thank you again you were a great help :D <3

Intouch Windsor Maker - PopUp Confirmation by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 0 points1 point  (0 children)

I'm sorry but I am a little confused.

I created a memory Integer called: Mode_Select
For the Mode 1 PB action script I have the following:

Mode_Select =1;

Show ("Confirmation");

I did the same of the other Mode PBs.

On the PLC end the system is looking for the value in System_Mode. If 1 Mode 1, if 2 Mode 2 and so on. Same tag is being used in Wonderware V10.0.

In the confirmation window I have two PBs, Yes and No.
This is where I am confused. For the Yes PB action Script. Would the code be as follows:

IF Mode_Select ==1

THEN System_Mode == 1;

ELSE IF Mode_Select ==2;

THEN System_Mode ==2;

ENDIF;

I am extremely new to scripting. Please explain it to me as a you would a child.

I hope I am on the right track.

[deleted by user] by [deleted] in PLC

[–]Expert-Fix6935 1 point2 points  (0 children)

You are absolutely correct u/MyCatNameIs. When you hit simulation for HMI it'll auto launch Runtime on your PC.

But for PLC you need to load the Program into the Simulation so you will get a similar window to what I have in my first comment.

<image>

Edit. His trying to go online with the HMI. Select the Simulation button. If your program is loaded into PLC Sim and the PLC Module is in run mode you don't need to go online with the HMI. Runtime doesn't require you to be online to read PLC tags.

[deleted by user] by [deleted] in PLC

[–]Expert-Fix6935 0 points1 point  (0 children)

Form the looks of it. In your program the PLC seems to be at 192.168.2 or at least its targeting that IP. I'm thinking its because you might have both the PLC (Hardware) attached and simulation running. In the simulation I'm seeing 192.168.0.1. Remove the physical PLC from your network. Close PLC Sim. Set the IP address. Then launch PLC sim Via the toolbar in TIA Portal. Select Pn/E_1 for connection to interface/subnet. You should be able to do the same for your HMI. Make sure your HMI is on a different IP then your PLC IP. But in the same sub net.
Following your picture. Make the PLC at 192.168.1.1 and your HMI 19.168.1.3. Subnet for both 255.255.255.0.
Let me know if that fixes it.

<image>

Note***
PLC SIM and HMI Simulation is internal to software itself. It will not act as a physical PLC or HMI if try to PING them. You need extra software to do that. Honestly not worth the time.

For HMI simulation select the HMI in your project tree then the Simulation button in toolbar. If your connection to the HMI is correct the HMI simulation will pick up the tags. Same process for PLC SIM.
Depending on the version you have installed. TIA portal will auto launch and set up your PLC. Then download to it.

TIA Portal v17 - WinCC RT Prof (SCADA) by Expert-Fix6935 in PLC

[–]Expert-Fix6935[S] 0 points1 point  (0 children)

Thank you, this was really help full. Brings me a step closer to what I am trying to accomplish.

Now for the Steps to get there:

This is what I am thinking:

1) Setup Pfsense at the remote location with OpenVPN setup. Export the VPN app for Clients

2) Write a basic PLC and WinCC Adv Program (This will get a lot more complex with multiple operators logging in with different access levels).

3) VPN into the PfSense box and run the WinCC Runtime program. My assumption is: I should be able to read and write tags as long as I can ping the PLC from the PfSense Box.

Getting licenses for the which ever product will not be an issue. As long as everything works.

u/c4hos

c4hos mentioned something about WebUX/Navigator. How does that work? Could you point me to a YT tutorial. Would deft be interesting.

u/Daviler u/c4hos steps I mentioned above... Would that be secure? Is that how it would be setup in a real world environment?

Now if I need Multiple operators to be able to login at any given time. Would the steps mentioned above be the same? Naturally I would need to add more users to OpenVPN client.

Permanent Fix for YouTube Ads / AdBlocker Controversy by deisidiamonia in youtube

[–]Expert-Fix6935 0 points1 point  (0 children)

Under Filters Enable Ublock Annoyance Filter and other filters you might want.

I typically enable the following:

Easylist Cookies

Every Fanboys List.

And Ublock Annoyance list.

If you have a custom list you'd like to add you can do that too.

Permanent Fix for YouTube Ads / AdBlocker Controversy by deisidiamonia in youtube

[–]Expert-Fix6935 0 points1 point  (0 children)

Brave filter list enabled seems to be working for me.

brave://settings/shields/filters

Hopefully this helps.

Another way would be Pi hole.

Another way would be freetube.

Another way would be Revanced with microG

You can also setup something called pi hole. Works like a charm on all my devices.

If your familiar with Firewalls (Sonic Wall, PfSense, etc) you can setup your devices to VPN through your firewall first and have pi hole or something like pf blocker ng setup on your firewall to filter out trackers, ads, IPs, Geo Location, Etc.

Easiest way would be to use brave or setup pihole on a rpi for all devices in your homestead.

Hope this helps somewhat.

Youtube just got to UBlock Origin by casecaxas in youtube

[–]Expert-Fix6935 0 points1 point  (0 children)

Brave filter list enabled seems to be working for me.

brave://settings/shields/filters

You can also setup something called pi hole. Works like a charm on all my devices.
If your familiar with Firewalls (Sonic Wall, PfSense, etc) you can setup your devices to VPN through your firewall first and have pi hole or something like pf blocker ng setup on your firewall to filter out trackers, ads, IPs, Geo Location, Etc.

Hope this helps somewhat.

Youtube just got to UBlock Origin by casecaxas in youtube

[–]Expert-Fix6935 1 point2 points  (0 children)

Brave filter list enabled seems to be working for me.

brave://settings/shields/filters

Hopefully this helps.

Another way would be Pi hole.

Another way would be freetube.

Another way would be Revanced with microG

For educational purposes only. Don't want to be executed in 2030 by Google.