02-13-2018 11:23 PM
Hi,
I need to get the output string of an onMessage callback from Galil and I have been following the guide below:
http://www.galilmc.com/news/software/using-labview-galiltools-communication-library
So far, I have managed to get the messages working after i substituted the program to be uploaded via Galil with my own .dmc program and the MG commands display the messages perfectly on the String indicator. What I actually need is to get the String that is to be displayed and pass it as a string input somewhere else instead.
I have tried using a property node, global variables and a type cast from the thread below but nothing seems to be working so far.
https://lavag.org/topic/4559-how-to-get-reference-to-text-of-stringconstant/
02-14-2018 03:58 AM
Hi cannotdo,
So far, I have managed to get the messages working
On the Galil website you linked to is explained, how to setup a callback VI and how to transfer the received string to a string control in the main VI. (See the paragraph "Handling Events with Labview and the GalilTools Communication Library"…)
What exactly is a problem to you?
What have you tried so far? (Mind to attach your VIs?)
02-14-2018 06:31 AM
My problem arises as I am trying to call out the unsolicited message from galiltools as a string (MG ":ILD:SET 3.0E-3", where the unsolicited message ":ILD:SET 3.0E-3" (a command for a seperate device) is sent as a data string input via GBIP. Currently I've tried connecting the string indicator to the GBIP write from outside of the case structure, but it doesn't seem to work.
The following attached is the VI i am working on,
And of the GBIP VI copied over from into my working VI, which works fine on its own.
02-14-2018 06:45 AM - edited 02-14-2018 06:53 AM
Hi cannotdo,
those GPIBRead/Write expect an address string…
(Do you really need to use those old GPIB functions instead of VISA? Are you working with an NI GPIB interface?)
I've tried connecting the string indicator to the GBIP write from outside of the case structure, but it doesn't seem to work.
Is the parallel (and uncorrdinated) execution of both kind of communications intended?
Your GPIBWrite needs to be executed AFTER you received that string. Easiest would be to wait for a string value change event: in your callback routine you should write the string data to your "message" string using a "value (signalling)" property.
02-14-2018 07:35 AM
@GerdW wrote:
Hi cannotdo,
those GPIBRead/Write expect an address string…
(Do you really need to use those old GPIB functions instead of VISA? Are you working with an NI GPIB interface?)
I've tried connecting the string indicator to the GBIP write from outside of the case structure, but it doesn't seem to work.
Is the parallel (and uncorrdinated) execution of both kind of communications intended?
Your GPIBWrite needs to be executed AFTER you received that string. Easiest would be to wait for a string value change event: in your callback routine you should write the string data to your "message" string using a "value (signalling)" property.
Yes, as the device we're hooked up to are pretty old (ITC510), we're bound to using a NI GBIP interface.
And because we're using the DMC file as a master, the devices (Linear Stage Galil and ITC510) are commanded asynchronously.
DMC file text looks something like this. With a brief explanation of what i hope to achieve.
MG ":ILD:SET 3.00E-3" (Laser current setting for ITC510)
MG ":LASER ON" (Turns on the Laser for ITC510)
PRX=20 (Linear Stage codes, PR = moves to a relative position respective to axis)
SPX=10 (SP controls speed of movement)
BGX (Begin x-axis movement)
AMX (Waits for x-axis movement to complete: controls the timing of events)
PRY=20
SPY=10
BGY
AMY
MG ":LASER OFF" (The command for ITC to turn laser off)
EN
Thanks.
02-19-2018 09:41 PM
02-20-2018 01:02 AM