Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ViGetAttribute constants for ibask options

Hello.

In the link below, it is introduced that the VISA function corresponding to ibask in ni4882.dll is viGetAttribute, but is there a list of constants for viGetAttribute corresponding to each option of ibask somewhere?

https://www.ni.com/docs/ja-JP/bundle/ni-visa/page/ni-visa/board-levelprogramming.html

 

I want to call IbaSerialNumber from VISA without using ibask.

I tried assigning the constant 0x0023 of IbaSerialNumber to viGetAttribute, but of course an error occurred.

0 Kudos
Message 1 of 8
(2,204 Views)

Hi Iwa6

Can you show more information about the error message or show us the picture to be clearer? 

 

Regards)

0 Kudos
Message 2 of 8
(2,156 Views)

Hello l.hovs.
Thank you for reply.

 

VISA gives an error that the constant does not exist.

ibaserial.png

 

0 Kudos
Message 3 of 8
(2,144 Views)

Hi Iwa6

I have found an article where is described how to solve this error, you shouldn't consider on LabVIEW parts, just follow troubleshooting steps to solve the issue. 

 

Regards)

________

Best way to thank is giving Kudos / Marking as a solution. 

0 Kudos
Message 4 of 8
(2,107 Views)

Hello l.hovs

Unfortunately the link you provided does not solve the problem.
This is because we know in advance that the reason for the error is that the property corresponding to 0x23 does not exist in viGetAttribute.
What I want to know is the viGetAttribute constant that corresponds to ibask's ibaSerialNumber(0x23). (If there is no way to know the serial number other than ibask, we welcome the provision of information to that effect.)
Also, I'm not using LabVIEW.

0 Kudos
Message 5 of 8
(2,091 Views)

Hi Iwa6

I was wondering why you are avoiding using ibask as long as it is working? 

About the error message, I doubt that there is something wrong with code in line 9, there should be call function in front of serial number (0x00000023). 

 

lhovs_0-1675771984111.png

 

Regards)

0 Kudos
Message 6 of 8
(1,991 Views)

Hello.

The purpose was to complete with VISA without using ibask.
Finally, I tried brute force (all Long type numbers) with viGetAttribute, but there was no constant equivalent to IbaSerialNumber.

0 Kudos
Message 7 of 8
(1,950 Views)

Hi Iwa6

If you are using USB seral port for VISA, here is "VI_ATTR_USB_SERIAL_NUM" command attribute for getting the serial number. You should put this in front of the seral number (0x00000023). Try to complete that in your side and see the results.  

 

Regards) 

0 Kudos
Message 8 of 8
(1,910 Views)