Real-Time Measurement and Control

Showing results for 
Search instead for 
Did you mean: 

Re: how to convert 80000 bytes of data received via serial port into 10000 sets each having 8 bytes


Hi A Person

   I do have code for reading and writing to the serial port. Also I have fpga vi as well as real time vi (host vi)


After I write "BS" command to the fpga port from the real time vi. The data received has to be transferred back to the real time vi.I didn't use DMA FIFO. I am using interrupt routine to transfer data from the fpga vi to the host vi.


I will attach my code with this

- 4-port serial vi is my fpga vi and crio modbus example is my host vi.


Kindly open Run GC subvi from host vi to take a look at what Iam talking about.


the code which Iam going to attach you is for our previous GC in which we will receive 1000 bytes at a time and check for our required datra string and then discard it. our data willbe present at the last 1000 bytes. so basically what we have performed is just string manipulation.if our dsired string is received we willl seperate data from it.


Now my problem is i have to alter the code in such a way that i need to discard the first 10 bytes and then divide the data which i receive into sets of 8.


note: I changed "the no of bytes to receive " in my code from 1000 to 8. so that i would receive 8 bytes at a time. but there is data loss. the total no of bytes received is reduced from 80000 to 70000.


Hope you understood my problem. i am in great need of your help. kindly help me out.




0 Kudos
Message 1 of 1