DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Save filename into a channel as string?

Hi!

I would like to save the filename of my DIAdem data into a channel as a string, because I have to export it to Matlab together with the data.

My problem is how to assign the string (filename) into a channel. I know that the filename is in FileDlgFile(right?). Please help me on this matter.

Thanks in advance!
0 Kudos
Message 1 of 5
(4,128 Views)
Dear DIAdem user,

here is a sample code which writes the data filename into a new created text channel.

Call ChnAlloc("x", 10, 1, DataTypeString)
ChT(1, "x") = DataFileName ' or DataFile

Check first if your export mechanism to Matlab supports text channels. The export via clipboard does.

Christian
Message 2 of 5
(4,128 Views)
Sir,

Thanks for the answer. I have further questions if you dont mind.

When I tried to transport the channel (w/ string values) to Matlab, all I got was a double array. I presume it wont work.

Can you please explain more on the transfer via the clipboard? Can it be programmed because I wish to do things automatic?

Is there a way, too, to display the contents of the string channel in DIAdem (like the way you do it in Matlab). I am at loss really on how to do this because I cant find it in the documentation.

One last thing, is there any Diadem tutorial or documentation aside from the manual that teaches advanced stuff about Diadem because i find the manual incomplete.

Thanks in advance!

-Ham
0 Kudos
Message 3 of 5
(4,128 Views)
Hello Ham,

Which version of DIAdem are you running? In DIAdem 9.0, you should be able to display a string channel in DIAdem VIEW just like you display numeric channels. To do this, open the DIAdem VIEW panel, click the fly-out menu "Predefined screen partitioning", then select the first icon ("One channel table with all channels"). You will see all your channels, including the text channel.

You can transfer channels from DIAdem to other applications via the Windows clipboard using the VBScript ChnClpCopy command, like this:

call ChnClpCopy("1-4")

I can easily use this command to transfer both numeric and string channels between DIAdem and Excel, but I don't have Matlab to test this with. I hope this works for you.

David Mc.
NI App
lications Engineer
0 Kudos
Message 4 of 5
(4,128 Views)
Hello Ham,

Which version of DIAdem are you running? In DIAdem 9.0, you should be
able to display a string channel in DIAdem VIEW just like you display
numeric channels. To do this, open the DIAdem VIEW panel, click the
fly-out menu "Predefined screen partitioning", then select the first
icon ("One channel table with all channels"). You will see all your
channels, including the text channel.

You can transfer channels from DIAdem to other applications via the
Windows clipboard using the VBScript ChnClpCopy command, like this:

call ChnClpCopy("1-4")

I can easily use this command to transfer both numeric and string
channels between DIAdem and Excel, but I don't have Matlab to test
this with. I hope this works for you.

David Mc.
NI Application
s Engineer
0 Kudos
Message 5 of 5
(4,128 Views)