Step 7 using FC10 addressing DB of UDT

Tommycai

Member
Join Date
Aug 2011
Location
KY
Posts
120
Hello all,

I have a question that hopefully has a yes :)

I am scanning a bar code and bringing in that string in a DB34.
I am trying to compare that string with already stored strings.
I cal FC10 for this part; however.

The first string is in a DB36.dbb0
The string is 14 characters long.

The next string starts at db36.dbb200. because in this db i have used a UDT for addressing. Is it possible to call this?

I call FC10 and string one is P#DB36.DBX0.0 and string 2 is P#DB36.DBX200.0 and the ret_value I made m155.0 but it only give me an error saying that the address does not fit?

is there a certain way to address this db that has a udt?
 
Hello all,

I have a question that hopefully has a yes :)

I am scanning a bar code and bringing in that string in a DB34.
I am trying to compare that string with already stored strings.
I cal FC10 for this part; however.

The first string is in a DB36.dbb0
The string is 14 characters long.

The next string starts at db36.dbb200. because in this db i have used a UDT for addressing. Is it possible to call this?

I call FC10 and string one is P#DB36.DBX0.0 and string 2 is P#DB36.DBX200.0 and the ret_value I made m155.0 but it only give me an error saying that the address does not fit?

is there a certain way to address this db that has a udt?

I've got no S7 here, but the FC10 is some string analyzer, eh?

Probably the FC10 must have equal lengths on both strings.
Try to address the UTD on both parameters and see if it fits now.

To get a better answer (and not a guess, as I do here), you should provide more specific info. Post a zip of the evil FC call.

Kalle
 
You should be referring to the string variables by their names, not their addresses:

See example attached:
 
Fc 10

You must make sure that they are both in string format and they are both the same length. If you are having truble with it being a UDT copy the same length (14) to a temp DB with equal lengths of string to compare.



FC10 EQ_STRNG

Description

The function FC10 compares the contents of two variables in the data type format STRING to find out if they are equal and outputs the result of the comparison as a return value. The return value has the signal state “1" if the string at parameter S1 is the same as the string at parameter S2.

The function does not report any errors.

Parameter Declaration Data Type Memory Area Description
S1 INPUT STRING D, L Input variable in format STRING
S2 INPUT STRING D, L Input variable in format STRING
RET_VAL OUTPUT BOOL I, Q, M, D, L Result of comparison
You can assign only a symbolically defined variable for the input parameters.
 

Similar Topics

I have a basic understanding of truth tables and the addresses. My issue is that for every letter that I have to make, I need a truth table that...
Replies
12
Views
1,437
I have for the longest time avoided using the S7-1500 because everyone warned me that TIA portal was a stinking pile of garbage to be avoided at...
Replies
25
Views
12,125
Good Afternoon , I have a project that I am beginning , that I will be using 3) PowerFlex 525's drives. I took notice of the StepLogic feature...
Replies
1
Views
3,911
So I know that in RSLogix 5000 you can use a tag in place of a static number in an argument of any instruction. For example... If I wanted to...
Replies
14
Views
3,465
Dear Experts. I have one project using HMI Ktp 1500 comfort and S7-300 CPU 315-2DP. The HMI KTP is using Software TIA porttal for programming, and...
Replies
2
Views
2,028
Back
Top Bottom