Jump to content

Recommended Posts

Posted (edited)

Hello fellow members,

 

It’s Beaning a wail that I have post on this form. But i need some help.

 

I have experience with programming plc in ladder and function blokes.

 

 

 

But not whit structured tekst.

 

I have made a recipe so that the machine can switched easy to divert parameters.  

 

 

 

No I have problem whit the ‘default settings’ for some parameters that van be de basic when something goes wrong.

 

 

 

Can anyone tell me wot I do wrong I have sent son screenshot to help you understand what I mean.

 

 

 

Thank you in advance

 

Device varible to device is not a problem

Device to device goes good.PNG

Not varible to device is a problem

Not variable goes wrong.PNG

 

For example what i mean whene I make it in ladder. 

Example in ladder.PNG

Edited by A.J
more informatie
Posted (edited)

Haven't checked the code but there is a space before the 10. Could be the issue.

which PLC are you using and which software ?

Hmm checked with GX 2 but it compiles without any problem 

 

Screenshot 2023-05-15 101545.jpg

Edited by Gambit
Posted

Hello Gambit, 

 

Sorry for a very late reactie, I have binne pretty busy.

 

But a use a fx5U plc and GX works 3.

 

I have use a space betore 10. 

 

If i got time tomorrow i willl check to be sure. 

Posted

hi Gambit, on the back of this, I am using ST on FX5 to do some maths with floats, in your opinion, does Mitsi have anything to help me separate the result into 2 groups. 1 where digits on left of coma are stored, 2 right to coma.

 

so for example, after a calculation I get a float of 2.34, how can I separate 2 from 0.34. The PLC needs to see that has to multiply 2 by 7, then 0.34 by 128.

 

Cheers.

Posted
1 hour ago, FRANK RUIZ said:

hi Gambit, on the back of this, I am using ST on FX5 to do some maths with floats, in your opinion, does Mitsi have anything to help me separate the result into 2 groups. 1 where digits on left of coma are stored, 2 right to coma.

 

so for example, after a calculation I get a float of 2.34, how can I separate 2 from 0.34. The PLC needs to see that has to multiply 2 by 7, then 0.34 by 128.

 

Cheers.

DEBCD(P) will seperate the exponent and the mantissa part.

But if you convert the Real number (2.34) to an integer value (FLT2INT) you will get an integer value (2).
turn that back into a float INT2FLT and subtact that from the origional with DESUB(P).
you should have your remainder (0.34)

 


 

 

  • Like 2
Posted
4 hours ago, Gambit said:

DEBCD(P) will seperate the exponent and the mantissa part.

But if you convert the Real number (2.34) to an integer value (FLT2INT) you will get an integer value (2).
turn that back into a float INT2FLT and subtact that from the origional with DESUB(P).
you should have your remainder (0.34)

 


 

 

thanks a million!

Posted
On 15-5-2023 at 10:05 AM, Gambit said:

Haven't checked the code but there is a space before the 10. Could be the issue.

which PLC are you using and which software ?

Hmm checked with GX 2 but it compiles without any problem 

 

Screenshot 2023-05-15 101545.jpg

Hello Gambit, 

 

I Have done somthing wrong begos me reply dit get on the form.

So i trie a gain. 

 

I use a FX5U,  and GXWorks 3

I have ols seen that I have space bewteen de the 10 and i have space.

 

I tried it wit a different device  that works, verry odd I think

Test D200 werkt wel.PNG

Posted

I don't change a Dev but I add a Dev. 

I add Dev D200 to test i that works, and that works. 

 

thats wy I think its odd that it doessent works white the label name

Posted

The problem was dat I not use the recept nummber in watch dog. But i use the basis. 

Thit use 

Recepten[Recept.Pointer].aantal_pot_in_laag

most use;

Recepten[17].aantal_pot_in_laag

 

Thank you Gambit

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...