How to replace the units of a channel using scripts % 3F

Hello

I have a few questions about the manipulation of the channel property 'unit' by scripts.

Case 1: If the unit in the chain is not specified in the properties, what command should be used to add the inside unit?

Case 2: When I create using the string ' Call.Root.ChannelGroups (1). Channels.Add ("name", DataTypeFloat64, 1)', empty space of unity being, what other command can be used which was available to the units to the breast?

Case 3: Consider that I have channel (channel A) with the already defined unit (x), how can I replace the unit with another (y)? (Units of x and there belong to different physical quantities, so the ChnUnitConvert)

Pls let me know if you nee details on the same.

Kind regards

Fazil Shah.

Hi Fazil,

The key word for SCRIPT DIAdem units is "unit_string". If you open the SCRIPT and open the channel property list you can select the property unit and drag & drop it in the SCRIPT Editor. This creates the code of script for the property.

Case 1
You have the options of towing: a quallified assignment complete or a channel object variable (if you have more settings for the channel of the second alternative is better)

Data.Root.ChannelGroups (1). Channels ("mychannel"). Properties ("unit_string"). Value = "MyUnit.

or

Dim oChn
Set oChn = Data.Root.ChannelGroups (x). Channels ("mychannel")
oChn.Properties ("unit_string"). Value = "MyUnit.

case 2
You must add the unit after the creation of the channel

Set oChn = Data.Root.ChannelGroups (x). Channels.Add ("MyChannel", DataTypeChnFloat64)
oChn.Properties ("unit_string"). Value = "MyUnit.

case 3
It's the same as case 1 or if you do not want to use an already existing channel device, it can look like this

oChnA.Properties ("unit_string"). Value = oChnB.Properties ("unit_string"). Value

I hope that answers your questions

Greetings

Walter

Tags: NI Software

Similar Questions

  • How to set the units creating paths with a script?

    I'm trying to update a script that used to work in Photoshop CS4, but that seems to completely ignore the units that I use in the clouds.  The script below should create a path with two lines that form an X through the whole document.

    To test, I created a new page 8.5 x 11 inches and 300 DPI.  I then run the script.  However, the form that is produced is huge and most are off the screen.  What I am doing wrong?

    function Point(x, y)

    {

    This.x = x;

    This.y = y;

    }

    function addVertexCorner (lineArray, x, y)

    {

    var p0Info = new PathPointInfo();

    lineArray.push (p0Info);

    p0Info.kind = PointKind.CORNERPOINT;

    p0Info.anchor = new Array (x, y);

    p0Info.leftDirection = p0Info.anchor;

    p0Info.rightDirection = p0Info.anchor;

    }

    function appendLine (p0, p1, lineSubPathArray)

    {

    var lineArray = new Array();

    addVertexCorner (lineArray, p0.x, p0.y);

    addVertexCorner (lineArray, p1.x, p1.y);

    pathInfo var = new SubPathInfo();

    lineSubPathArray.push (pathInfo);

    pathInfo.operation = ShapeOperation.SHAPEADD;

    pathInfo.closed = false;

    pathInfo.entireSubPath = lineArray;

    }

    function createPathLayer (title, subPathArray)

    {

    var app.activeDocument = docRef;

    var originalUnit = app.preferences.rulerUnits;

    app.preferences.rulerUnits = Units.PIXELS;

    var myPathItem = docRef.pathItems.add (title, subPathArray);

    app.preferences.rulerUnits = originalUnit;

    }

    var app.activeDocument = docRef;

    var imgWidth = docRef.width.as ("px");

    var imgHeight = docRef.height.as ("px");

    P00 var = new Point (0, 0);

    P10 var = new Point (imgWidth, 0);

    P01 var = new Point (0, imgHeight);

    P11 var = new Point (imgWidth, imgHeight);

    var lineSubPathArray = new Array();

    appendLine (p00, p11, lineSubPathArray);

    appendLine (p01, p10, lineSubPathArray);

    createPathLayer ("Big X", lineSubPathArray);

    The code you have posted product lines with points in the corners of the image for me when the image is 72DPI.

    Could you post a screenshot of the faulty results with the relevant panels visible?

    OK, but what is so special about using 72 DPI?

    At 72 dpi 1 pixel corresponds to 1 point.

  • Re: Satellite A100-692 - how to replace the CD/DVD drive?

    Hello

    the device DVD/combined my A100-692 is damaged and I want to replace it.
    I found no still no guide how to replace the unit.

    Is there something available?

    Thanks in advance!

    Hello!

    AFAIK, you must remove the keyboard first, before you can replace the CD/DVD drive. Remove the screws on the lower side, and then you can push the disc if you have replaced the keyboard.
    It seems to be a bit tricky

    Maybe you should ask a technician for laptop to help. They can replace the CD/DVD drive for you.

    Good bye

  • Satellite Pro L50 - a: how to replace the memory, HARD drive and battery

    I just uploaded 2 new video from Youtube on the L50 - A. Satellite Pro

    The first is a tear down showing how to replace the memory, hard drive and battery (you can also clean the fan if it detects overheating).

    http://www.YouTube.com/watch?v=IG0lW7t92bI

    BTW why they made it so difficult to get just to the battery in this model?

    WARNING - proceed at your own risk and don't forget static precautions!

    Hope they help and if you have any questions let me know.

    + The message was edited: link has been removed ad channel may not +.

    Thanks for these videos. It may be useful to replace the memory, but I think that the owners of the laptop should not open the case. This may void the warranty.
    Be careful about this.

  • How to replace the CD/DVD-Rom on Satellite Pro 2100

    Hello

    My laptop's dvd - rom drive is old and broken, now that I have here an other dvd - rom drive, but I don't know how to remove the old dvd - rom without removing all parts of my laptop. Is there some service manuals how to replace the dvd - rom drive?

    Hello

    I m not 100% sure on the CD/DVD drive replacement on this laptop, but I assume that the procedure is very similar to other portable players.
    For the most part the ODD is secured with the screw at the bottom of the unit.
    You will need to remove this screw to get out and to swap the drive.

    But be careful and don t there if you have no experience!
    Moreover, not all readers are compatible and supported in reason parameters master/slave/c-salt. If you n t know which drives are compatible you should ask the ASP in your country for advice!

  • Qosmio G50 - 10J: how to replace the optical disc drive (ODD)?

    Hello

    the optical drive of my Qosmio G 50 does not work properly, it reads only some movie-DVD, but unfortunately not videogameDVDs at all, so I can't install any games.
    The guarantee is also outdated. So I wanted to ask if it is possible to change the disk myself, if it is then how I had to do and if by the laptop would be in
    risk to get damaged?

    I would be very grateful for each tip and all the help guys can give me!

    Best regards
    a.z.

    Hello

    In various cases the ODD replacement is very delicate.

    If you wish, you can consult this forum category.
    Here you will find some videos how to replace the ODD on the different laptop models:
    http://forums.computers.Toshiba-Europe.com/Forums/Forum.jspa?forumid=115

    This is also a nice Youtube Channel which provides the instructions how to replace the ODD:
    http://www.YouTube.com/user/toshibaeuropesupport

    But the ODD laser lens may be dirty. In my case I could solve similar problem, cleaning the lens of the laser by using a cotton ball and alcohol tip.
    But make sure that this!

  • How to replace the screen & HDD in Tecra S1

    Could someone help me with 2 queries?
    1. how to replace the screen? I broke my screen 15 "and have a replacement original but would like to know if this is possible without the help of the reseller, etc.
    2. bad drive c. message is 992 KB bad clusters. How to replace or repair the C drive?
    Thank you
    BL

    Hello

    Well, the replacement of HARD disk drive is very easy on the Tecra S1.
    At the bottom of the unit, you will find a cover that protects the HARD drive Bay.
    A screw covers. Remove it.
    Then, it should be possible to remove the HARD drive.

    The replacement of the screen is another matter. It is not easy to remove it. In this case I recommend to contact Toshiba service in your country for details.

  • How to replace the contents of the settings/passwords backup server / current browser bookmarks?

    Classic scenario: after the bookmark long manual organization Firefox Sync adds trash of its server to my laptop or tablet.

    Where can I find how to replace the content of the backup of the server by settings/passwords / current browser bookmarks? Stupid me, I put a new synchronization and lost this ability.

    It is not recommended to go back to the old version of Sync

    The old version is removed he'll stop being available soon, it takes getting used to using the new version.

    IIRC, it is actually possible to force synchronization of the old working with Fx29 & Fx30 using an old profile or preferences of piracy, but I don't think I should encourage users to try this, but it would be better than using an older version of Firefox which is really bad. In fact using an old outdated version of Firefox is so bad, that it is customary to recommend using a browser on alternative day of someone else instead.

    Firefox ESR is aimed at corporate users, definitely, at the moment, it will use the synchronization of the former. Who will update soon to use synchronization well again, and this time, I guess the synchronization of the former will probably totally frowned upon for example are not available at all.

    It is possible to use the feedback system to leave a short comment on Sync. I would recommend this making, but at least to make very many people of spirit comments that I doubt will have no effect.

  • How to replace the optical drive on the Tecra R940

    Hi all.
    I search everywhere trying to see how to replace the ODD (optical disc drive) of a laptop Toshiba Tecra R940? pt439a-00n003
    its supposed to be easy, but can't get out.

    Anyone know where I can get some info on how to make the?

    Thanks for reading!

    I think that there are just one or two screws holding it on the basic coverage, it then behind the scenes.

  • How to replace the HDD on Satellite 1130?

    How to replace the hard drive in this notebook?

    Hello

    If I remember well HDD is under the optical media drive. Optical media drive is fixed with a screw that you see above the player. Remove the screw and remove the drive from the Bay.

    HARD drive is fixed, I think, 4 screws (probably black). When the screws are removed you can use two fingers to remove the HDD from the connector plug. I hope you now know how to put the new HARD drive.

    Good bye

  • Portege M400: How to replace the pen plastic top?

    How to replace the plastic "pen" at the top of the "pen" (the tool that you use for writing that is specific to this computer).
    I can't find any instructions.

    PS: I want to say that I had to rephrase the question so many times that I get the following

    you mean p * n? He told me that whenever I wanted to write aswell EP *.

    I don't know what exactly you want, you want to replace the tip?
    (if you actuall refers to the Act of writing)

  • Equium - how to replace the HARD drive?

    Hello

    I need to replace the hard drive on my Toshiba Equium.
    Can someone tell me the procedure? I changed it once before, and I remember having to press one of the function keys when I turned on the laptop with the new hard drive installed.
    Should I have the recovery disk when the laptop is turned on with the new hard drive installed?

    Thank you very much

    Tim.

    Hey,.

    You should take a look in your user manual. Sometimes you will find a detailed how instruction replace the HARD disk, but it according to your laptop model.

    If you swapped the HARD drive, you need to reinstall Windows. Therefore, you can take the Toshiba Recovery disk that will restore the initial setup in a few minutes with all the drivers and tools. You only have to boot from that drive and that s all! :)

  • How to replace the CPU on satellite A110-252

    I have a satellite A110-252 and need to know how to replace the cpu, hope someone can help you.

    Doug

    First of all there if the new processor would be compatible with the BIOS.
    Second, you should know that a plu CPU produce more heat and this would lead to overheating.
    Are you sure that your laptop would deal with the new CPU?
    I don t think so

    In any case, I found this page:
    http://www.irisvista.com/tech/

    There may be some useful pic and instructions for you

    But once again; If I was you, I wouldn't try it.

  • display HP 7 voice tab broken, unfortunately. tab is under warranty... How to replace the screen

    display HP 7 voice tab broken, unfortunately. tab is under warranty... How to replace the screen

    HP India never have bad service. I hv order three books "hp 15-ac026tx" before five days for the company. Distributior open boxes. But at the time of installation pilot not single manager of the graphics card, 2 GB. As a Distributor, realized with the support of Hp, they said that the engineer will soon be at your place. But still no one came. And im going to cancel this order and will prefer another compony.

  • How to replace the DVD drive on a series of Satellite?

    Could someone give me instructions how to replace the DVD drive?
    I unscrewed a few screws in back and two under keyboard and I still can't get out.
    Any suggestions?

    Thank you
    Select this option.

    I found it!

    It's the single screw! It is under the flap of the memory.

Maybe you are looking for