11-07-2017 07:49 AM
Hi All,
I would like to know information on payload data of Ethernet of NI VISA. Currently i am using NI VISA to communicate with device RIGOL DP832 via LAN. I am sending command *idn? to get description of device. I get required details but i am curious on how NI VISA ethernet packet works as i am creating my driver for this device.
I see payload length as 72 with special characters before command "*idn?" in payload data ASCII. with my driver command is of length 26(specified array length) and i see payload data as only "*idn?".
Could someone help me understand why i am getting this special characters in payload data of NI VISA?
Solved! Go to Solution.
11-07-2017 09:31 AM - edited 11-07-2017 09:32 AM
"NI-VISA Ethernet" is standard Ethernet accessed through VISA
From Wikipedia, the free encyclopedia
A data packet on an Ethernet link is called an Ethernet packet, which transports an Ethernet frame as its payload.[1]
An Ethernet frame is preceded by a preamble and start frame delimiter (SFD), which are both part of the Ethernet packet at the physical layer. Each Ethernet frame starts with an Ethernet header, which contains destination and source MAC addresses as its first two fields. The middle section of the frame is payload data including any headers for other protocols (for example, Internet Protocol) carried in the frame. The frame ends with a frame check sequence (FCS), which is a 32-bit cyclic redundancy check used to detect any in-transit corruption of data.
But the beauty of VISA is you don't really need to know any of that, as VISA abstracts the communication bus specifics. So all you have to worry about is sending the (SCPI) commands to the instrument.
11-07-2017 09:59 AM
Thank you for your reply.
I know concept of ethernet packets and how frames are divided. But my question is command sent to device via VISA is different compare to command what i am sending via my driver.
In below picture you can see 1st two commands is from my driver and last one is from VISA. this is payload data in ASCII.
Also if i compare data of VISA and my driver then i see difference in bits. I tried with 80 bit length but then i get all this special character after my command. I am still finding difficulty in figuring out why to payload frames of same command is different.
Thanks.
11-07-2017 10:04 AM
Well at this point you are going to have to show us your code, otherwise we are just guessing.
11-07-2017 10:12 AM
I am using CAPL programming language and TCPsend command of CAPL after connecting to device.
Where DP832 is created socket through which i am sending my command to device.
11-07-2017 10:31 AM
Is there any way to know how payload frames are constructed in VISA?
11-07-2017 10:37 AM
Probably not without speaking directly to a NI engineer.
11-07-2017 11:17 AM
Offhand, I'd say someone was trying to send a CR/LF but mixed up hex with decimal values.
11-09-2017 07:13 AM
Carriage return or line feed has no influence on sending data frames i guess. My string sent as command converts data to hexadecimal. Could someone suggest or explain me how data is sent through NI VISA. As already mentioned before payload data sent via VISA is different.
11-09-2017 10:38 AM
What type of VISA resource are you using, INSTR (instrument) or SOCKET (raw socket)? If it's SOCKET, then VISA should be sending your string without any alterations. If it's INSTR, then the VXI-11 protocol will be used, which unfortunately I don't have any experience with.