Mas01

What does Asterisk ( * ) mean in this rung?...

13 posts in this topic

Complete newbie thrown in at the deep end, please can someone tell me what the * means in this rung and what rung is trying to do? Thanks

 

1265   |---------| |----------[*   D40    K7502   D580 ]

 

 

Share this post


Link to post
Share on other sites

multiplication of the value of D40 with 7502. The result is put in D580 + D581 (32 bits)

1 person likes this

Share this post


Link to post
Share on other sites

Brilliant Gambit many thanks...

on GX developer, when I hover over "D40" it tells me what it is "Vessel Pressure", but hovering over the others does nothing ....how can I find out what the other are? Totally lost, but many thanks for the reply.

Share this post


Link to post
Share on other sites

That's because in the comment list D40 has vessel pressure. K means a decimal value.

I guess there is no comment for D580. Isn't there a statement above the instruction or a note at the end.

Check you're view settings in GX 

1 person likes this

Share this post


Link to post
Share on other sites
17 minutes ago, Gambit said:

That's because in the comment list D40 has vessel pressure. K means a decimal value.

I guess there is no comment for D580. Isn't there a statement above the instruction or a note at the end.

Check you're view settings in GX 

Thanks again . I "enabled" some views and some of the parameter names appear in green, but nothing for K7502  or D580.

If I can just find out the value of K7502 and D580, I will be happy.

If "K" signifies a decimal number, what does "D" signify please?

Edited by Mas01

Share this post


Link to post
Share on other sites

K7502 is the value 7502 (decimal) 

D580 and D581 contains the result of Value D40 x 7502

D means Dataregister 

1 person likes this

Share this post


Link to post
Share on other sites

There are some free e-learning on PLC on www.mitsubishielectric.com/fa

 

1 person likes this

Share this post


Link to post
Share on other sites
1 minute ago, Gambit said:

K7502 is the value 7502 (decimal) 

D580 and D581 contains the result of Value D40 x 7502

D means Dataregister 

Brilliant - I thought K7502 was some mysterious variable name!! So it's the Decimal value 7502.

This value makes sense because the Vessel Press D40 is being converted to TORR.

Many thanks, I finally understood something!

Share this post


Link to post
Share on other sites

UPDATE...I think the penny has dropped....because after this line

1265   |---------| |----------[*   D40    K7502   D580 ]
 

I see

-----------------------------[D/   D580    K10000     D582   ]

 

which is a DIVISION by 10,000, (right?) and then deposit the value in D582 (vessel pressure)

 

D582 I know is an analogue output of mA.

Edited by Mas01

Share this post


Link to post
Share on other sites

almost.... check instructions manual

 

as i recall instruction / writes to both D582 and D583 since result is 32bit and each D-register is only 16-bit.

and instruction D/ is using 32-bit parameters so result is again double width or 64-bit and hence takes 4 consecutive D-registers.

1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, panic mode said:

almost.... check instructions manual

 

as i recall instruction / writes to both D582 and D583 since result is 32bit and each D-register is only 16-bit.

and instruction D/ is using 32-bit parameters so result is again double width or 64-bit and hence takes 4 consecutive D-registers.

Thanks but I’m confused. I know that D582 is an  analogue output (mA) which is used to drive a little digital display of the vessel pressure.

Does this mean the value on the display is not accurate?

Share this post


Link to post
Share on other sites

well... single D register is a 16-bit memory block. it can be used for many things. it can be used as 16 Boolean flags, or as two bytes or characters. if grouped with other registers it can be used to hold pieces of data that exceed 16-bit (an array, string, DINT, real number etc.).

the bottom line is this is just a small block of data (ones and zeroes) and it can be used for many different things. how is it used and when is up to you. you can also change radix to view data in different form. so form that you are observing is not necessarily correct representation even if contained value is correct. for example you may use it for some analog value but viewing it in binary or hexadecimal or ASCII would sure look odd even if value viewed on external display is correct.

the point here is that you need to know size of data that you are using or you will end up with incorrect result (and worse... perhaps it would only be wrong sometimes).

usually you want to stick with instructions that use same size parameters (avoid mixing *,/,+,- with D*.D/,D+,D-) and you want to make sure to leave enough space for each parameter. 

suppose you want to do 32-bit multiplication like C=A*B

and A is stored in D580, D581

then B better be stored somewhere else such as D582, D583. common mistake is to have them overlap.

also observe size of result C. so that no other variables are sharing same D-registers. 

it is unclear what type of "analog" you are talking about. in general, that is anything that has more than two values. some analogs are 8,10,12,14, 15, 16, 24 or even 32 bit though on PLCs, they tend to be up to 16-bit.. 

 

1 person likes this

Share this post


Link to post
Share on other sites
8 hours ago, panic mode said:

well... single D register is a 16-bit memory block. it can be used for many things. it can be used as 16 Boolean flags, or as two bytes or characters. if grouped with other registers it can be used to hold pieces of data that exceed 16-bit (an array, string, DINT, real number etc.).

the bottom line is this is just a small block of data (ones and zeroes) and it can be used for many different things. how is it used and when is up to you. you can also change radix to view data in different form. so form that you are observing is not necessarily correct representation even if contained value is correct. for example you may use it for some analog value but viewing it in binary or hexadecimal or ASCII would sure look odd even if value viewed on external display is correct.

the point here is that you need to know size of data that you are using or you will end up with incorrect result (and worse... perhaps it would only be wrong sometimes).

usually you want to stick with instructions that use same size parameters (avoid mixing *,/,+,- with D*.D/,D+,D-) and you want to make sure to leave enough space for each parameter. 

suppose you want to do 32-bit multiplication like C=A*B

and A is stored in D580, D581

then B better be stored somewhere else such as D582, D583. common mistake is to have them overlap.

also observe size of result C. so that no other variables are sharing same D-registers. 

it is unclear what type of "analog" you are talking about. in general, that is anything that has more than two values. some analogs are 8,10,12,14, 15, 16, 24 or even 32 bit though on PLCs, they tend to be up to 16-bit.. 

 

Many thanks for taking the time to reply. I appreciate it. I wish I were clued up about PLCs then my terminology would not be so confusing.

To answer your question about the analogue input...basically there is a pressure sensor on the vessel which sends a mA current to the PLC and this is 'mapped' to D40. If I understand the ladder logic correctly (I think I do now, thanks to the above help), the current is multiplied by 7,502 and then the result is divided by 10,000. The resulting (analogue) current is output by the PLC (D582) and interpreted by the little digital display which tells us the pressure (units Torr) inside the vessel.

Many thanks again - I feel totally lost sometimes.

Edited by Mas01

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now