Sending two different bytes of data to Labview via USB
Posted: Wed Mar 28, 2012 6:44 am
Hi,
I'm using the ECIO_28 to measure the frequency of a waveform using interrupt RBO to reset Timer1, which is 16 bit timer, on a rising edge clock edge.
I want to send the contents of Timer1 just before resetting it to Labview using the USB slave component by sending the contents of tmr1h and tmr1l continually to Labview (i.e. two consectutive bytes).
My question is when sending two consectutive bytes continually to Labview how do I get Labview to identify which byte is which, so that tmr1h is not mixed up with tmr1l?
The reason I'm sending the timer1 information to Labview is that I'm doing the frequency calculation in Labview based on the value of Timer1.
I could do the frequency calculation in the ECIO_28 but I would want to create an integer to get enough frequency range on the measurement and I don't know how to do a USB slave transfer of an integer. The examples only show it for bytes. If somebody knows how to transfer the contents of an integer via USB I would welcome any suggestions. I think I'm back to the problem where I would have to parse the integer into two bytes anyway and send them consectutively.
Rgds,
Paul
I'm using the ECIO_28 to measure the frequency of a waveform using interrupt RBO to reset Timer1, which is 16 bit timer, on a rising edge clock edge.
I want to send the contents of Timer1 just before resetting it to Labview using the USB slave component by sending the contents of tmr1h and tmr1l continually to Labview (i.e. two consectutive bytes).
My question is when sending two consectutive bytes continually to Labview how do I get Labview to identify which byte is which, so that tmr1h is not mixed up with tmr1l?
The reason I'm sending the timer1 information to Labview is that I'm doing the frequency calculation in Labview based on the value of Timer1.
I could do the frequency calculation in the ECIO_28 but I would want to create an integer to get enough frequency range on the measurement and I don't know how to do a USB slave transfer of an integer. The examples only show it for bytes. If somebody knows how to transfer the contents of an integer via USB I would welcome any suggestions. I think I'm back to the problem where I would have to parse the integer into two bytes anyway and send them consectutively.
Rgds,
Paul