Jump to content

Search the Community

Showing results for tags 'float'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Our Community
    • Come on in!
  • News and Announcements
    • New! UniLogic V1.24 introduces VFDS from Unitronics!!
    • VisiLogic:9.8.64 - Link to mobile app, Ladder: 2x the Space!
    • New!!! ***** U90 Ladder*****
  • UniStream HMI + PLC Programmable Controllers & UniLogic Software
    • UniStream: Hardware
    • UniLogic Software
    • UniLogic UDFBs
    • Industry 4.0, IioT, MQTT--Looking forward
  • Vision, Samba, Jazz and M90 PLC + HMIs & Software
    • Vision & Samba PLC + HMI Controllers & VisiLogic Software
    • Jazz, M91 PLCs and U90Ladder
  • Software Utilities
    • SD Card Suite
    • Remote Operator
    • Remote Access
    • DataXport and DataXls
    • UniDownloader
    • UniOPC
    • UniDDE
  • Utilities for .net and Visual Studio
    • Unitronics PCOM Protocol
    • COM Object ActiveX .dll
    • .NET driver
  • Project Design
    • ...I have a project...what hardware do I need?
  • User Application Stories
    • Just finished a great project?
  • Tips and Tricks
    • Best Programming Practices
    • Tips and Tricks
  • Job Board
    • Projects seeking Programmers
    • Programmers seeking Projects
  • General Discussion
    • We're Listening...
    • The Lounge
  • News and Announcements Copy

Blogs

  • Unitronics' Blog: PLCs, HMIs and more
  • Saragani's Blog
  • Simon's Blog
  • Ash Neilson's Blog
  • Joe Tauser's Blog
  • Unitronics en Español
  • Powered by AMPS
  • Alldrives UK's Blog
  • Unitronics, Howman Style
  • PLCNewbie's Blog
  • Telestar Automation Blog
  • Webinars Collection
  • Tim's Corner
  • Blog
  • TELESTAR (Italian)
  • i4 Automation
  • i4 Automation (UK)
  • Unistream UDFB's

Categories

  • From Headquarters: Sample Applications
    • From Headquarters: VisiLogic
    • From Unitronics: U90 Ladder applications
  • User-submitted Applications
    • From Users: VisiLogic applications
    • From Users: U90 Applications

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 7 results

  1. HI, I'm trying to communicate with another device via my V350. I'm using Modbus IP and I can successfully connect and read the 16-bit registers. However when I try to read the 32-bit registers I get either some very small numbers, below was my best guess, but as you can see I get a very small number. (should be 32856.876) I would also like to be able to read the 64-bit registers if possible Thanks All the best, Palsson
  2. Hi, What is the best solution for converting two 16 bits registers from modbus device to floating point in UniStream? 2x16 bit registers = 32 int to float. (IEEE754 single pr). Is there any FB for this kind of conversion? The device information: I don´t believe I have to do this manually with calculation according to standard IEEE 754. If anybody know any method, it will be appreciated.
  3. Hello, I'm have some problems with the conversion of two integers to a floating point value. I have a modbus energy meter (SDM120) who works with 32bit IEEE745 floats values. In visilogic I receive two 16bit integers (MI); MI0 : 15643 MI1: -23069 I converted these integers to bits by the 'num to bit' function block. These are the converted value's : MI0 : 15643 --> 0011 1101 0001 1011 MI1: -23069 --> 1010 0101 1110 0011 If I put the two value's behind eachother I get the following binary code: 0011 1101 0001 1011 1010 0101 1110 0011 (MI0,MI1) When I fill in these binary code on a online binary to IEEE745 converter I get the following result: 0,038 This matches with the amps showing on the energy meter's display. The question is; How can can I make from MI0(15643) and MI1(-23069) a float in Visilogic So, MI0(15643) and MI1(-23069) -------------- some kind of formula -----------> MF0 = 0,038 Annyone who can help? Best regards, Jelmer
  4. Hi, I`m using Unitronics Vision OPLC IDE Version 9.8.31 Build 0. I have done some math calculation in float format and want to present i on the HMI panel (SM43-J-R20). I don`t want to have decimal in the HMI display. I have not found a function for convert my float value to integer.... ? And I have not figure out how I can control the number of decimal in the HMI for a float value? I assume these is something many others also have struggled with ? by I haven`t find any topics in the forum who help me out... I have tried the String Num to ASCII function, but I haven`t been able to get it to work... the value out of the function is just freezed. I have grateful for your time / inputs, project should be sent ASAP from us to customer... Thank you.
  5. Hi, I managed how to get data from database using read_db function from activex.dll in vb6. I want to read whith copymemory function a float value from database but i get a large decimal number with cientific notation. Also i cannot read the entire database, so im doing it in groups of 19 cuz if i do 20 i get an error "9 Subscript out of range". Here is my code: Private Sub LeerBD() Dim Valores() As Byte Dim i As Integer Dim iFecha As String Dim iHora As String Dim iTipo As String Dim iLote As Long Dim iTemCam As Double Dim iHumedad As Integer Dim iPresion As Integer Dim iPeso As Double Dim iEst As String Dim Pointer As Long Dim grupo As Long On Error GoTo mal For grupo = 0 To 101949 Step 19 * 51 Call mComDriver.Read_DB(grupo, 19, 51, 51, Valores) Pointer = 0 For i = 1 To 19 iFecha = PointerToString(VarPtr(Valores(Pointer))) Pointer = Pointer + 10 iHora = PointerToString(VarPtr(Valores(Pointer))) Pointer = Pointer + 10 iTipo = PointerToString(VarPtr(Valores(Pointer))) Pointer = Pointer + 10 Call CopyMemory(iLote, Valores(Pointer), 4) Pointer = Pointer + 4 Call CopyMemory(iTemCam, Valores(Pointer), 4) Pointer = Pointer + 4 Call CopyMemory(iHumedad, Valores(Pointer), 2) Pointer = Pointer + 2 Call CopyMemory(iPresion, Valores(Pointer), 2) Pointer = Pointer + 2 Call CopyMemory(iPeso, Valores(Pointer), 4) Pointer = Pointer + 4 iEst = PointerToString(VarPtr(Valores(Pointer))) Pointer = Pointer + 5 Debug.Print iFecha & "-" & iHora & "-" & iTipo & "-" & iLote & "-" & iTemCam & "-" & iHumedad & "-" & iPresion & "-" & iPeso & "-" & iEst Next i Next grupo Exit Sub mal: MsgBox "[" & Err.Number & "] " & Err.Description, vbCritical, "Error" End Sub the results for iTemCam or iPeso are like this: 8.39516345413446E-320 1.27321882187115E-314 Any ideas what im doing wrong?
  6. Hi there, i'm not able to read 32bit float big-endian from Janitza UMG104. Connection is over COM1 in Modbus mode, periodic trigger activated by pushbutton and set slave-name (bit) to 1. This works fine for the Modbus TCP slave, which provide me system information. The powermeter i try to read, deliver me important informations which i later need to add together with sensor values to a data table. Reading fails at the point, the 32bit float comes in. I tried: Register addresses 19018 (current, A), 19026 (power, W) and 19034 (power, VA) with own Tags as REAL, with memory float array MF[MF_0] to MF[MF_2], reading the registers from normal table (1639) and with adding address value for little endian communication. Nothing works. Registers 19xxx provide most used values. The REAL goes to a REAL to INT converter, ouput is INT32. A try with GridVis and Janitza Modbus Diagnostic tool works fine, all 3 Register addresses with reading 4 bytes. When i take a look the the online state of the memory floats, i see flickering data. I will try the swap bytes extended, but i hope, you have generally an idea, what goes wrong and how i can fix this. Pictures follows later, when i'm back to work Enviroment: Janitza UMG104 (latest firmware), Unistream USP-156-B10 (latest firmware), Com1 38400/8/n/1 Modbus periodic, Modbus Slave ID 1. (yes, I'm new to PLC/HMI) BR
  7. Hi, I have a Vision V1210 Controller that is supposed to read float values from pH meter over RS485 MODBUS RTU. All the communication is fine, using "Read Float Registers" FB the float value is stored in two consecutive MI registers (MI0 and MI1). I can see that retrieved value is 32bit float ordered big-endian (I believe that's IEEE 754) and I was wondering if there is some way to display it on screen? One way would be converting it to some integer representation so I can easily put it in a numeric box and use 1.2 decimal format (pH values should be in range 5.00-9.00), but I haven't found any ladder element for such conversion. Am I missing something obvious? It's worth mentioning that I don't need to do any calculations on these floats, just display them on screen. Thanks -- Petar.
×
×
  • Create New...