Search the Community
Showing results for tags 'real'.
Found 4 results
I have an Ohaus scale with a serial printer port connected to a Unistream 5" pro. A part is place on scale and a comparison is made to a valid weight range. I finally have a working model for getting weight ASCII string into a REAL but it's very clunky. There has to be a better way. The biggest issue with my conversion rung (before using mul & add FB's) is if I weight in a part at 10.39 grams and the REAL displays as such and the next weight is 7.43 grams (THE TENS PLACE IS A NULL ((BLANK)) CHARACTER) the real displays as 0.43 grams. The tenths and hundredths always read out okay because the zeros present regardless of fractional weight. Is there a cleaner way to take " 10.39 g" ASCII, narrow to "10.39" ASCII and convert to REAL D#10.39? Next issue, I want the buzzer (more of a beeper) to sound for a short burst when a valid weight is received. In Vision there was a simple SB bit that would sound buzzer for any duration the OTE was true. I have tried several constructs with the BUZZER START AND BUZZER STOP actions but always end up with a continuous buzzer or a chatter. Please and thank you for any assistance. Please see "WEIGH IN" subroutine for example of the code I have that works but could stand to be simpler. JorachoPressNewScale12-20-18e.ulpr
I am reading values via rs-485, and am correctly reading and displaying these values on the unistream. However, I need to pass these values on to a building management system via Modbus tcp over ethernet. I have no issue communicating with the system, and I believe the system is correctly reading integer values from the unistream. The issue I run into is with real numbers. For one thing I can't seem to find anywhere that says what the default byte order is for real numbers (big endian, little endian) or how to change that, which I believe is at least a large part of the problem. I have been stuck on this problem for over a week so any feedback would be great.
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
Hello, First I would like to apologize for my bad english. I'm working on program which is completely controlling system of solar panels, as a diploma work. I've got few problems but this one makes me sad. I can't figure out, how to correctly setup real time clock. I've tried examples in visilogic directory, searched the whole help at the program but after 2 days, still can't make it work. The best way possible for me would be having DW with real time information about time, such as DD.MM.YY and HH.MM.SS ... If it's even possible, because, I'm having many operations which will need to write time when it happened and only one DW with time would save me much space in ladder. But, I will be satisfied with any other working option. I've found SI30-36 but they are read only, so I can't use them to write there down todays time. Since I'm still beginner with ladder programming, can someone please give me an advice? I'm really desperate. I will give more information, if needed. Just leave me here a message. Thanks in advance for help. Best regards Martin P. EDIT: I may find a way but I can't figure out how to increase DW by 1. It increasing something but more then it should, like 50 per sec. Is there way to do it? Thanks again!