LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble sending data out/figuring out its format via GPIB

So I need to send data out to a machine, and the description of how it should be sent out is confusing me.

The manual is here:

 

http://facilities.mrl.uiuc.edu/laserlab/manuals/DS345m.pdf

 

The data description is at the bottom of page 3-8 of the document, or page 59 of the PDF.

I would paste it here, but its too long.

 

The data I want to send out is ridiculously simple, its literally just:

 

0,0

1,+2047

 

I'm not sure if I need the '+' in there or not.

I'm trying to use VISA write and sending the values as strings one by one, which doesn't work.

 

There is a C example program on page 3-19 or page 70 in PDF terms. 

 

If someone could help, I'd be greatly in their debt. 

 

Thank you

 

 

0 Kudos
Message 1 of 11
(2,730 Views)

Are you sending the command as well as the data?  Are you sending a termination character (page 3-1, pdf 50)? Are you getting the "1" response between the command and the data?  Are you sending the correct checksum?

 

What happens when you run your program? What errors do you get?  Have you checked the instrument status for instrument errors?

 

Please post your program.

 

Lynn

0 Kudos
Message 2 of 11
(2,717 Views)

 


@johnsold wrote:

Are you sending the command as well as the data?  Are you sending a termination character (page 3-1, pdf 50)? Are you getting the "1" response between the command and the data?  Are you sending the correct checksum?

 

What happens when you run your program? What errors do you get?  Have you checked the instrument status for instrument errors?

 

Please post your program.

 

Lynn


I am sending the command LDWF? 0,2 then waiting for the 1, then trying to send out my data, but I do not understand what format it wants me to send my data in.  Yes, I am sending the termination character. 

 

The issue is that I do not know what form to send the data out in. I step through the program and it errors on the VISA Write where I try to send out the data, right after I read the 1, because my data is in the incorrect format.

 

As I stated, my data is simply two points:

0,0

1,2047

 

The program is literally as I said above, nothing to really look at. Just write LDWF command, wait for 1, then attempt to write out my data (all via GPIB VISA Write LabVIEW module). 

 

I just need help interpreting how to send out the data. 

 

Thank you

 

0 Kudos
Message 3 of 11
(2,711 Views)

Is this the same question with a different user name?

 

Time to post your code because your description of what and how you are sending is somewhat ambiguous to me.

0 Kudos
Message 4 of 11
(2,704 Views)

 


@Dennis Knutson wrote:

Is this the same question with a different user name?

 

Time to post your code because your description of what and how you are sending is somewhat ambiguous to me.


 

 

I've attached my code, but its rather useless, just sends the initial command then reads the 1.

 

I have no idea how to send the data, so I've given up trying to send it until I know how.

 

That question looks similar, and could be identical, but I don't know enough about how I want the data to be output to know that.

 

Main question: How do I format the data as the PDF above states it must be formatted so I can send it out to the device?

0 Kudos
Message 5 of 11
(2,686 Views)

I think you want to use this:

 

Instrument Driver for DS345

0 Kudos
Message 6 of 11
(2,682 Views)

 


@Taki1999 wrote:

I think you want to use this:

 

Instrument Driver for DS345


 

I was using that, but when I programmed my own waveform using it, it would give out voltages as it set different frequencies/values, which we can't have for our application. 

 

I also couldn't interpret how that was sending the data out to the device.

0 Kudos
Message 7 of 11
(2,680 Views)

Since the driver has the exact code needed to download a signal in either point or vector mode, you need to study that. Any example that someone gives you would be the exact same code.

 

As regards the driver, I suspect your problem is the way you have programmed the waveform. I also suspect that you would be much further ahead in fixing this problem instead of trying to write something from scratch.

0 Kudos
Message 8 of 11
(2,671 Views)

 


@Dennis Knutson wrote:

Since the driver has the exact code needed to download a signal in either point or vector mode, you need to study that. Any example that someone gives you would be the exact same code.

 

As regards the driver, I suspect your problem is the way you have programmed the waveform. I also suspect that you would be much further ahead in fixing this problem instead of trying to write something from scratch.


 

I'm just hoping for a simple example, since I'm literally outputting 2 points:

 

0,0

1,+2047

 

When programming the waveform by hand on the machine, there are no "bad" voltages that appear. 

I've looked at the driver and am unsure what it's doing to output to the machine, which is why I posted here for help.

Every time I've run the driver, made my own code trying other ways than this, etc, I get "bad voltages" showing up.

I've been at this for ~2 weeks on and off, trying different ways.

 

I literally just need to figure out how to output:

0,0

1,+2047

in the way as specified by the PDF and I'm done.

0 Kudos
Message 9 of 11
(2,666 Views)

The DS345 Send Arbwave Array IS the simple example you need to follow. It really does not matter whether you are sending 2 or 2000 points. The process is the same.

 

 

0 Kudos
Message 10 of 11
(2,662 Views)