11-13-2023 07:21 AM
muy buenas
necesito hacer un recoja 2 datos numéricos cada vez que disparo una señal , y que al llegar a 20 , el ultimo valor se borre y todos los demás avancen un puesto dejando el primero libre para el dato actual
estoy aprendiendo
muchas gracias , un saludo a todos
11-13-2023 07:26 AM
Hi Johnnie,
@Johnnie129 wrote:I need to collect 2 numerical data every time I trigger a signal, and when it reaches 20, the last value is deleted and all the others advance one place, leaving the first free for the current data
What have you tried and where are you stuck?
Mind to attach your VI?
Sounds like you need to use a shift register to hold an array of data, and you want to prepend new data elements to that array. I guess it also helps to provide a simple example to explain why you collect 2 samples, but only prepend one sample to your array…
11-13-2023 07:36 AM
es una parte nueva para un proyecto de automatización que he empezado , se trata de 1 maquina con 20 compartimentos en una cinta , que recoje productos y necesito saber que hay en cada uno , los introduzco mediante un número, y cada vez que avanza la cinta el último cae y al primero llega uno nuevo
It is a new part for an automation project that I have started, it is 1 machine with 20 compartments on a belt, which collects products and I need to know what is in each one, I enter them using a number, and each time the belt advances The last one falls and a new one arrives at the first
11-13-2023 07:43 AM
Hi Johnnie,
@Johnnie129 wrote:
It is a new part for an automation project that I have started, it is 1 machine with 20 compartments on a belt, which collects products and I need to know what is in each one, I enter them using a number, and each time the belt advances The last one falls and a new one arrives at the first
Try to use the PtByPt-DataQueue function with length parameter set to 20.
Or implement to content of that VI on your own using a shift register and an array of 20 elements...
11-13-2023 08:17 AM
ok , voy a investigar esas opciones y les comento como me va!!
muchisimas gracias!!
Ok, I'm going to investigate those options and let you know how it goes!!
thanks a lot!!