Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial

Solved!
Go to solution

Okay, here is part of the manual. On page 33 of the PDF there is another packet that has so error fixes I believe. There is one more packet like that, of error corrections, but I don't have it with me right now. I can upload it later on if you think we need it.

-K
0 Kudos
Message 11 of 43
(1,636 Views)

Well, that is the generic format of a single packet. I'm not sure whether that is a read or write packet. It's clear that you will have to work in hex in order to send the correct sync codes, calculate the checksum, etc.

0 Kudos
Message 12 of 43
(1,634 Views)

does labview accept hex as a string?

-K
0 Kudos
Message 13 of 43
(1,631 Views)

You mean VISA. You can simply right click on a string control/constant and select Hex Display. You can also create a U8 array and use the Byte Array to String function. You can also use the Typecast function.

0 Kudos
Message 14 of 43
(1,626 Views)

Is there a way to put muliple data entries of hex into the same string line? because I'm pretty sure that the code I need will have to be multiple characters all as a single command. or do I need to just do it each individually and set it up as one large  VI?

-K
0 Kudos
Message 15 of 43
(1,621 Views)

Of course you can have multiple characters in a single write. You were doing that with your writes to that GPIB instrument you were playing with. Totally irrelevant if the characters displayed are ASCII or HEX. They are just bytes being sent.

0 Kudos
Message 16 of 43
(1,617 Views)

well when I changed it to hex it would not let me put spaces or press enter to distinguish between a different data entry.

-K
0 Kudos
Message 17 of 43
(1,614 Views)

That is a slightly different question. Typically, for multiple entries/discrete commands, you would have a write for each. This is easily done with the Write inside a for loop and passing in an array of commands. Also, a carriage return/line feed/space are distinct hex characters and you would typically not randomly place them where you wanted. The instrument would not intrepret them as separators but as data (and invalid data at that).

0 Kudos
Message 18 of 43
(1,608 Views)

Ok, I am still confused as to how I can draw out what I need from the maual in order to get a comand to work in Labview.

 

 

-K
0 Kudos
Message 19 of 43
(1,595 Views)

nevermind

-K
0 Kudos
Message 20 of 43
(1,567 Views)