12-10-2007 03:52 AM
12-10-2007 04:21 AM
12-11-2007 10:17 AM - edited 12-11-2007 10:23 AM
Hi Seicento,
I strongly advise to start from scratch but let’s first break in small pieces your colleague code. The first part of the code where you have three DAQmx task is clearly controlling a third party device that receives 5 V pulse as an input. The second part of the code is a sequence structure composes by two frames, the frame “0” is outputting a unsigned 16 bits integer that comes from the “iteration terminal” of the for loop. Second frame of the sequence structure has a blue “Express VI”, named Instruments I/O Assistant this part of the code serially write “:READ?” to this third party device; it must be a command that will make the device send a Measurment to your computer through port COM1.
The only part of your code that I think can be change to serial is the first frame of the sequence structure. Where instead of writing the unsigned 16 bits integer to 16 lines in parallel you will write it to one line serial. In this case each of the 16 bits will be written on the line which each clock pulse.
I have attached a screen shoot of a code in LabVIEW that will nicely help you accomplish this task; this code is no more than a modification of the example: “Cont Write Dig Chan-Burst.vi”, it uses the onboard clock to output the number through one of the line of the port.
I hope it helps, remember that you can find this example in LabVIEW. (Help -> Find Examples -> Search Tab -> type the name of the example).
12-11-2007 10:28 AM
12-12-2007 03:57 AM
12-12-2007 04:58 AM
12-13-2007 12:33 PM
Hi Seicento,
Since the previous post from Graziano is a very good suggestion for your “for loop” issue, let me address your 200898 error. If you look this knowledgebase: Why do I get Error -200898 during Hardware-timed Digital Input/Output?. The 6534 does not support partial port hardware time applications, in other words you cannot output a digital pattern in just one line on a port hardware time. Your solution is to select the line that you won’t need and tristate them. Performing a Software Timed Tristate on the 6533/6534 is an example in LabVIEW 8.5 that might give you a guide in tristating the lines you are not going to be using. Another workaround is to make “Serial Dac in.vi” generates 8 waveforms instead of 1 where one line is your data and the other 7 are drove with zero values.
Since you have told in the post that you are fairly new to LabVIEW I would like to point you to some very useful debugging resources there is a light bolt close to the run button on the “block diagram” this is called highlight execution, it will slow down the flow of your code letting you watch it as it run, one of my favorite tools in LabVIEW.
I hope it helps