SoMachine datatype question on negative number

Jeppe666

Lifetime Supporting Member
Join Date
Jun 2008
Location
Florida
Posts
11
Hello,

Background with PL7 and just started with SoMacine 4.2 Logicbuilder.

I have Modbus Slave reading an analog value into a Word. All works great as long the value is positive (0-100) - however once reading is negative (-1...-100) value acts as a unsigned integer. -1 shows up as 65535, -2 as 65534 etc.

I see what is happening, but cant seem to get datatype conversion correct and then scaled with a division of 10 (see attached).

Quite sure this is a newbie thing, but does anyone have a pointer as to what I do wrong? Also, CFC is new for me so fumbling a bit in the darkness :)

Tia,
JP

Type_Convertion_attempt.JPG
 
Took it one step further

Made it a little further (attached) - hope my question makes better sense now.

Demo2.jpg
 

Similar Topics

Hello dear experts, I incurred in an anomaly while working with HMISCU devices by Schneider. I downloaded the program and everything seems to...
Replies
0
Views
411
Configuring a PWM block for servo control in SoMachine today and was attempting to run in simulator to test some loop controls, will PWM output...
Replies
0
Views
907
Hi all, I've been trying to develop modbus rtu program between uv balasts and plc ı'have 6 slave balast.I am reading fault run voltages etc...
Replies
0
Views
1,172
Hi, i don´t get why my coil doesn't activate when the contact it´s true. I'm new to PLC programming, this is my first project. I'm attaching...
Replies
3
Views
1,456
hello eveyrone I want to make an application with M221 PLC in SOMACHINE BASIC program. I request your valuable help. I have a 50 ms pulse...
Replies
1
Views
1,582
Back
Top Bottom