Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial comms handshaking control

In measurement studio CWserial has properties to set handshaking lines i.e. RTS to true or false. This doesn't change the status of the lines. Even with set to false on launching the application the line will be true. Does anybody know the reason? Using MSComm the equivalent is RTSenable which works.
0 Kudos
Message 1 of 6
(4,110 Views)
Sometimes the driver (VISA for example) don't allow manual access to the Handshaking lines when you use the hardware handshaking mode. Just because then the lines are controlled by the driver/UART.

Henrik
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 6
(4,110 Views)
Hi,
which version of Component Works (Measurement Studio) and what environment (C++, c#, vb, or .net variant) are you using.
Visa does in fact allow you to assert and de-assert the serial rts line, so I'm as yet unsure as to the problem.
If you could let us know the version info, then we can investigate further.

Thanks

Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 3 of 6
(4,110 Views)
Thank you for your reply. I'm using Measurement studio version 6 and the Visual basic environment version 6. I'm using the CWserial property as opposed the CWVisa property.
0 Kudos
Message 4 of 6
(4,110 Views)
Hi,
apologies for the delay. I've verified the situation, and marked the problem up to our developers. Not an answer we obviously like to give.
As an interim workaround, you can use the MScomm control instead as this does work, and can be used at the same time as cwserial and cwvisa.
I found that I alternated between read only status on the rts line, and no error, but also no result when using cwvisa in Visual Basic. Strange that it works in LabVIEW's interface, so it's definitely a problem in component works only.

Thanks
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 5 of 6
(4,110 Views)
Hi,
the best we can do is a VISA workaround.
Use SetVisaAttribute instead.
You can get the attribute constands from the visa headers. See code below ( assuming you have a command button called Command1 and CWVisa1 on the form.

Option Explicit
Const VI_ATTR_ASRL_RTS_STATE = &H3FFF00C0
Const VI_STATE_ASSERTED = 1
Const VI_STATE_UNASSERTED = 0
Const VI_STATE_UNKNOWN = -1

Private Sub Command1_Click()
Dim state As CWVisaLineStates
CWVisa1.Open state = CWVisa1.Asrl.RtsState
CWVisa1.SetVisaAttribute VI_ATTR_ASRL_RTS_STATE, vbLong, VI_STATE_UNASSERTED state = CWVisa1.Asrl.RtsState
CWVisa1.Close
End Sub

Otherwise, back to MSComm.

Hope that helps
Sacha.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 6 of 6
(4,110 Views)