Search the Community
Showing results for tags 'function block'.
-
Hi all. For a few years, I have been using the HSC frequency measurement on the V350. My program uses the example that was given by Unitronics and I have not altered it much. Suddenly, my programs have stopped working when I download them to a new PLC. The HSC behaves unusual and gives me false readings. My program is to control micro water turbines and it uses HSC to measure the frequency of the generator. I am using a simple frequency converter that gives me pulses into my HSCO port. The pulses are 50Hz and I confirm using a digital meter that the input receives 50Hz. In the hardware setting, I define my input in the HSI(RELOAD) tap that my counter target value is 50 and I enable Reload on startup (See Hardware setup in attachment). Now in the ladder program, I define the "Frequency Measurement based on HSC" function block as shown in the picture. When I run the program on my V350 I receive signal to my input and the actual HSC value is incrementing. I can see the number goes 50 steps for about 1 second so it's counting right (50Hz gives 50 pulses). But my frequency seems to be off from the function block. See this video: https://streamable.com/ovzps I measure about 62.11Hz with the function block. The status message for the Frequency block jumps between 0 and 16. Zero means normal behavior but there's no explanation on what 16 means in the manual. Now if I change the Permissible delta (C-in the function block) to RAW measurement and start it again, this happens: https://streamable.com/tbt24 The counter slows down (lags) and I measure about 10Hz, and that makes no sense. Should I not receive about 50.00Hz? out of the function block? I tried to change PLC, tested on SAMBA and I am experiencing the same thing. What am I missing. The only thing that has changed (I think) is that I updated the Visilogic software and the firmware on the PLC. A test program is at the bottom if you want to see it for your self. Thank you Cheers, Arnor HSC_Test.vlp
-
While using the vector store function, the data will not be stored into any vector if the offset is zero. Is this working as intended? Doesn't seem to make sense that you can't index into the vector that is your starting address. Anyone else experience this and have a work around? Running V570 9.8.2 Attached is a snippet of the code where I am having the issue. The first function is checking that we're in the correct state of our state machine, the second is verifying that data is being sent. From there I take the vector of inputs and store the data in a temporary MI then attempt to store it into a vector of MI's with the start address of MI200 and the offset has been calculated in previous nets. When non-zero, it functions great. When the offset is 1, it stores the data into MI201 as expected. If the offset is zero, no data is stored into MI200 and no other action that I can see happens.
- 1 reply
-
- vector store
- vector
-
(and 4 more)
Tagged with: