Need help with subtracting a fixed value from a digital value

tempname24756

Member
Join Date
Nov 2015
Location
sweden
Posts
4
Basically I have a digital value I need to scale down using this equation:
'end_value = (D1-1000)/100' but I'm having trouble writing it down to my program.

I've created a local label which is of a VAR_CONSTANT type and the data type is word[signed], the value of this variable is 1000.

At the moment it looks like this

 -|/|--------[-P D1 var_1000 new_var] 



If I've understood this correctly the new value should be stored in 'new_var' but it remains 0. I'm out of ideas and I've tried to read Mitsubishi's "Q-series basic course(for GX developer)" manual.

The contacts and their names does not matter at the moment because all I want to do is (D1-1000)/100. I can add the code to the real program at a later stage when I have solved my issue.

Using GX works2
 
Last edited:
not familiar with this plc,just read the book,

my guess

LD X0
/P D0 K1000 D2
-P D2 K100 D4

OR

LD X0
/ D0 K1000 D2
- D2 K100 D4
 
Last edited:
Hi


Looks like MITSUBSHI Plc to me

I would either use the mov instruction or use the monitor window to force the valve in

Donnchadh
 

Similar Topics

So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
60
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
352
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
177
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
88
Back
Top Bottom