regarding USB_WRITE function in labview_dll.dll

Post Reply
srikrishna
Posts: 10
Joined: Fri May 22, 2009 5:16 am
Location: India

regarding USB_WRITE function in labview_dll.dll

Post by srikrishna »

Hello all,
In understanding the actiview 605 -light.vi,i am confused about the function USB_write function.Actually this function is used to intialise the communication i.e when we pass handle and data(which should be an array of 64 bytes where 1st byte should be 255) as input arguments and it will initialise the communication.But in labview program it was implemented differently.Can anybody clear my issue?

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen »

The USB_WRITE call is used for two functions:

- start and stop acquisition, 1st byte of the 64 byte array is used, in LabVIEW, I used the values 1 and 0 to start/stop the acquisition (actually, only the LSB of the byte is read by the USB receiver to start and stop)
- sent output triggers to the trigger port on the USB receiver, 2nd and 3rd bytes are used

Best regards, Coen (BioSemi)

srikrishna
Posts: 10
Joined: Fri May 22, 2009 5:16 am
Location: India

Regarding the function ACT_Pointer

Post by srikrishna »

Hi coen,
Thanks for your early reply..Can u explain why the sub vi ACT_pointer is used?

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen »

Act_Pointer.vi determines whether new data is available in the ringbuffer. If not enough new data is available, the program waits. If enough new data is available, the program reads a new block of data from the ringbuffer.

Best regards, Coen (BioSemi)

srikrishna
Posts: 10
Joined: Fri May 22, 2009 5:16 am
Location: India

Regarding Act_pointer.vi

Post by srikrishna »

Hi coen,
Thank you very much for the replies u are giving..I have few more doubts in the VI.
when we handshake with the receiver using USB_write.vi and after if we put read_pointer.vi ,how much of data(in bytes) we can acquire in one shot?Is it so that we have to wait untill total ring buffer(32 Mbytes) had to fill and after that we need to capture the data which we want to write into files..
Suppose if i want to display and write into files only 256 bytes of data what about the remaining data(32Mbytes-256 bytes).Is it going to be wasted?

And also i am quite confused with implementation of act_pointer.vi?first we have divided the buffer pointer with 4,so we will get how many bytes are read..Upto that only i could understand.

And also in the 4 th state of the state machine...there are some Vis like convert0-4.vi and etcs.Can u explain why they are meant for..

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen »

The program reads (variable) parts of the ringbuffer. The data remains available in the ringbuffer until overwritten by new data (when the "clock" has made a full round).

The convertxxx vi's are used to adjust the program to the version (Mk1 or Mk2) and sample rate (speedmode) of the connected AD-box.

Best regards, Coen (BioSemi)

srikrishna
Posts: 10
Joined: Fri May 22, 2009 5:16 am
Location: India

Regarding ACT_pointer

Post by srikrishna »

Hi all,
In the Act_pointer.vi is the implementation such that buffer_pointer/4 values always be greater than the old total buffered value ..else the program will stop without filling the ring buffer..is it so?[/url]

Post Reply