Help~This error comes up after I download my program.

Thanks, I found the problem. The reason is I used a variable to open a DB indirectly like this:

OPN DB [#AlarmDB]

on the top of a FB. However, I have to repeat it more times in between of the program, otherwise, the program will create errors if I use DBWxxx . Seems like it doesn't know which DB it belongs to.

Have you experienced that?
 
Are you accessing any other global db variables ?

After

OPN DB [#AlarmDB]

the global DB open is specified by AlarmDB

If you now have some processing as follows

A DB1.DBX0.0
= M0.0

The global DB open is now DB1
 
No, I don't have any other global DB opened in the same FB.
If there is a Network that doesn't contain any data fron the DB[#AlarmDB], before the next Network with DBXxxx, I have to do "OPN DB [#AlarmDB] again, otherwise, it won't work.
 
The internal variable in FB belongs to it's own instance DB, is it affecting the global DB? shouldn't , right?
 
Post your code.

Here's an example showing the global DB changing from 200 to 5

dbdbdb.JPG
 
Last edited:
No. Look at the column heading - you are displaying the accumulator (standard). Right click in the RH pane and you can make the DB1 resgister visible.
 
OH, OK, it shows 1 from top to the bottom.

I know how to troubleshoot now. Thanks a lot. You are so diligent, alway available to help me. That's so nice. What is your time now?
 
Actually, I have more questions, I don't know how to ask. I already struggled for a long time.

I have an FC to create a "one shot" signal every time the input change the status. It works fine if I call it in OB1. However, if I call it an an FB, it doesn't work, it works but the "one shot" signal doesn't show in the FB. I don't know why.
 
You are probably using a temp variable to store the rising edge status in the FC- temps are not remembered between calls.(although it can happen depending on what other blocks are called and what they do to their allocated temp data).

When you have a problem post your code.
 

Similar Topics

I am having a problem communicating my PLC with Drive via Modbus connection. I start by opening the port and there is no problem, but then when I...
Replies
5
Views
39
Hello all, I am currently trying to establish a message instruction to pass data from a 1756-L73 to a 1756-L71. My communication path from the...
Replies
5
Views
93
Dear sir, I am using SIMATIC 300, CPU 315-2DP , (6ES7 315-2AF03-0AB0) VIPA 603-1CC21 A1.0 RAM 32KB, Firmware=V4.0.8 The problem Im using MPI...
Replies
1
Views
58
Hi all, I am having an issue where some of my HMI push Buttons and Indicators go in to error when I navigate to a new screen. I am using a...
Replies
16
Views
308
The application was working in Twincat 4022.16 Used VM for offline. recently changed the laptop and the getting the error with Message as below...
Replies
0
Views
32
Back
Top Bottom