Hi, problem with DB data...

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
sssfs.JPG


I have a strange problem,

As you can see, the Latchvalues are identical, this is basically unpossible...

When I connect first to MD10, MD20, MD30 and MD40 (refer to network 3) and then to the DB data, then everything works like it should...

But not if I use the DB Data like you can see on the image ???

How is this possible ?
 
From your previous post, #LATCH is only written to under certain conditions. If this is so, the #LATCH will need to be an IN_OUT type variable - my guess is it's an OUT which is why it fails when using a fully defined DB address as the parameter. Then again with the little detailed information provided, I may be wrong.
 
amazing

Okay,

First of all, you are amazing dude...

It was indeed an OUT, and indeed I write to it under certain conditions. I made an IN/OUT from it, like you said, and it works now...


So, when u jump over the variable, and you don't write to this OUT variable where a DB value is connected to on the outside of the function, then troubles come along... ?

With an FB I wouldn't had this problem I suppose ?





L D[AR2 said:
From your previous post, #LATCH is only written to under certain conditions. If this is so, the #LATCH will need to be an IN_OUT type variable - my guess is it's an OUT which is why it fails when using a fully defined DB address as the parameter. Then again with the little detailed information provided, I may be wrong.
 
k

In that Thread, Sparkz says it would be better to make everything IN/OUT... in an FC, it's much safer...

Is that correct ?


L D[AR2 said:
Yes, you are correct about the FB case. If you want more explanation about what is going on, read through the following thread. The original question was about the differences between Step5/7 but it develops into the mechanism used for FC parameters.

http://www.plctalk.net/qanda/showthread.php?t=29559&highlight=fully+defined
 
Combo said:
In that Thread, Sparkz says it would be better to make everything IN/OUT... in an FC, it's much safer...

Is that correct ?

I use OUT if I'm always writing the output
I use IN/OUT if I conditionally write the output or use the variable for incrementing etc.

You could use IN/OUT all the time but note there may be extra code/processing where it may not be required.
 

Similar Topics

I am working on a project, inside an AB CLX, I implemented the Modbus TCP Client AOI published on AB website, to interreact with a Modbus ASCII...
Replies
7
Views
3,589
Hi All, I have a very big Fat troubles. When there is a Restart of an Automate PC (Dosage).. After resume the batch number of the Production...
Replies
12
Views
2,989
Hello friends We communicate between Micro 830 and a card that control DC motor via modbus RTU. We do not have any problems in communication. But...
Replies
1
Views
1,526
Hi all, Although I am working with my first Graphite display, this isn't my first go-around with Crimson. I started working with a few things on...
Replies
6
Views
5,104
Back
Top Bottom